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
468
@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: 第三世界のじょんぺり & 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

» How to get author name?

EdibleMuffin - Feb 12

1 by ZeroCrystal »»
Feb 17, 9:53 AM

» [FEATURE REQUEST] Bulk requests & add fields param to users watchlist

KibbeWater - Feb 13

0 by KibbeWater »»
Feb 13, 8:38 AM

» Too many request even with 10 seconds delay

Joaoniespodzinsk - Jan 31

1 by ZeroCrystal »»
Feb 4, 11:04 AM

» Anime Field: Streaming Platforms

SeeYouLaterSpace - Feb 10, 2023

2 by IridescentJaune »»
Jan 30, 1:21 PM

» Allowed usage or not ?

dczerwon - Jan 13

0 by dczerwon »»
Jan 13, 3:07 AM
It’s time to ditch the text file.
Keep track of your anime easily by creating your own list.
Sign Up Login