-
🌌 @ZeroCrystalPossible output:
Authorise your application by clicking here: https://myanimelist.net/v1/oauth2/authorize?response_type=code&client_id=1234&code_challenge=YI6SgshpIHSJfhTWfuUnevyMiS4QhIeDHPNXvGpBgxGdiosXdkIOJr_738o910cWZz5zm6RIAGr1jt1eN-yJ00ikucM81pXwg2erfnUSvYTAKU8FXmVsE0VUETtJqZFs Copy-paste the Authorisation Code: a1b2c3d4e5f6 Token generated successfully! Token saved in "token.json" >>> Greetings ZeroCrystal! <<<
-
🌌 @ZeroCrystal@SweetLife123, that's not necessary. The only person who has to create a client using the API panel is the app's developer.
Once you obtain your Client ID (Android applications don't receive a Client Secret), you can incorporate it directly inside your app's code. The overall workflow is the following:
- a new/logged out user taps on a login button;
- the app generates a Code Verifier/Code Challenge and opens the Authorisation URL inside a web browser;
- the user presses on the Allow button and gets redirected to the URL provided in the API panel by the app's developer;
- the app catches the redirection and reads the Authorisation Code from the URL (this can be done by using a private-use URI scheme, claiming a "https" scheme URI, or using the loopback interface);
- the app exchanges the Authorisation Code for a new token and stores it locally;
- the app can now use the API using the just-obtained Access Token.
Edited by ZeroCrystal
Please register or sign in to comment