Forum Settings
Forums
New
Dec 4, 2022 4:44 AM
#1
Offline
Nov 2016
2
Hi, im trying to create my own APi.
Im following the tutorial https://myanimelist.net/blog.php?eid=835707
but when im trying to do step 2 after allowing, ive got message that Safari cant connect to the server 'localhost'.
Am I doing something wrong? My app redirect URL is http://localhost/oauth just like in tut.
I've tried also using this tut https://gitlab.com/-/snippets/2039434 but the answer is same.

Thanks
tamcio_Dec 4, 2022 4:50 AM
Reply Disabled for Non-Club Members
Dec 4, 2022 6:42 AM
#2
四十二

Offline
Mar 2016
488
@blaNKye: Hi! That's the expected behaviour if you're not listening for incoming connections on localhost.

After getting redirected, the URL should look like this:
http://localhost/oauth?code=def5020425...

What comes after ?code= is your Authorisation Code. You need this to generate your Access Token.
HTCPCP/1.0  ★ MetaMAL  ★ Picture credits: Kieed & 1041uuu
Dec 4, 2022 7:23 AM
#3
Offline
Nov 2016
2
Okay i did it and i've got my token. Thanks. but how can i use it to for example print my list, coz i dont know how to use this https://myanimelist.net/apiconfig/references/api/v2#tag/anime. Sorry but im very new to API. Im coding in python :D

Ok, nvm i think i've got this. Thanks for help!
tamcio_Dec 4, 2022 7:32 AM
Mar 18, 2024 1:56 AM
#4
Offline
Sep 2022
1
Reply to tamcio_
Okay i did it and i've got my token. Thanks. but how can i use it to for example print my list, coz i dont know how to use this https://myanimelist.net/apiconfig/references/api/v2#tag/anime. Sorry but im very new to API. Im coding in python :D

Ok, nvm i think i've got this. Thanks for help!
@tamcio_ hey can you tell how you implemented the token part I am getting the code at the moment
Apr 22, 2024 4:35 AM
#5
Offline
Apr 2024
1
Reply to ZeroCrystal
@blaNKye: Hi! That's the expected behaviour if you're not listening for incoming connections on localhost.

After getting redirected, the URL should look like this:
http://localhost/oauth?code=def5020425...

What comes after ?code= is your Authorisation Code. You need this to generate your Access Token.
@ZeroCrystal Hi, how am I able to extract the authorisation code into my python file?
Reply Disabled for Non-Club Members

More topics from this board

» I built a spotify-styled 'MyAnimeList Wrapped' for a yearly review of your anime and manga

XAvishkar - Dec 14

1 by Joeliazeers »»
Dec 17, 1:01 PM

» [Repost] list of all relation_type and media_type.

Mr_UnknownOtaku - Dec 8

4 by -DxP- »»
Dec 12, 8:43 AM

» How to get author name?

EdibleMuffin - Feb 12

4 by XAvishkar »»
Dec 8, 9:52 AM

» 401 Unauthorized when doing authorization flow

Konng_ - Nov 16

2 by Konng_ »»
Nov 28, 3:24 PM

» [discontinued] I made a webapp to compare plan-to-watch lists

daux - Apr 16, 2022

33 by daux »»
Oct 2, 4:17 PM
It’s time to ditch the text file.
Keep track of your anime easily by creating your own list.
Sign Up Login