Exchange the Code For a Token
POST {{api_host}}/oauth/access_token?client_id={{app_id}}&client_secret={{app_secret}}&code={{code}}&grant_type=authorization_code&redirect_uri={{redirect_uri}}
Once you receive a code, exchange it for a short-lived access token by sending a POST
request to the /oauth/access_token endpoint
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
client_id | string | Your Threads App ID displayed in App Dashboard > App settings > Basic > Threads App ID. Example: 990602627938098. | |
client_secret | string | Your Threads App Secret displayed in App Dashboard > App settings > Basic > Threads App secret. Example: a1b2C3D4. | |
code | string | Authorization Code | |
grant_type | string | This value is required | |
redirect_uri | string | The redirect URI you passed when you directed the user to the Authorization Window. This must be the same URI or the request will be rejected. |