Exchange an Authorization Code For a Token

This endpoint is the final step in our 📖 OAuth Authentication Flow.

Use this endpoint to exchange an Authorization Code for a User Access Token, which can be used to access the rest of this API.

To ensure that your application does not retain unnecessary access to user data, revoke this access token in the event that is no longer required (e.g. the user deletes their account).

Endpoint not applicable for Personal Apps. See our 📚 Getting started guide to set up your Personal App.

OAuth2 Error Responses

In keeping with the OAuth2 specification, error responses from this endpoint contain an error in the error field, rather than the message field used by other Akahu endpoints.

For more details see:

Body Params
string
required

Must always be authorization_code

string
required

The code to be exchanged for a User Access Token, received upon the user's completion of the authorization redirect flow.

string
required

Same redirect_uri you specified to start the OAuth flow to receive an exchange code.

string
required

Your Akahu App ID Token

string
required

Your Akahu App Secret

Responses

Language
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json