Skip to content
  • Possible 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! <<<
  • Lemon Grass @SweetLife123 ·

    A question about something I don't quite understand. Suppose I'm using this API in an android application. I can register a client from my account. How would the users of my app have access to their profiles? Would they have to register their own accounts as clients as well?

  • @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:

    1. a new/logged out user taps on a login button;
    2. the app generates a Code Verifier/Code Challenge and opens the Authorisation URL inside a web browser;
    3. the user presses on the Allow button and gets redirected to the URL provided in the API panel by the app's developer;
    4. 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);
    5. the app exchanges the Authorisation Code for a new token and stores it locally;
    6. the app can now use the API using the just-obtained Access Token.
    Edited by ZeroCrystal
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment