2. Redirect back to your site by MID
If the user accepts your request, MID redirects the user back to your site with a temporary code
in a code parameter. The temporary code will expire after 10 minutes.
In addition, it also contains the state you provided in the previous step in the state
parameter. If the states don't match, it means a third party created the request, and you should abort the process.
Exchange the code for an access token:
Parameters:
client_id
string
Required. The client ID you received from MID for your OAuth App.
client_secret
string
Required. The client secret you received from MID for your OAuth App.
grant_type
string
Required. grant_type=authorization_code
code
string
Required. The code you received as a response to Step 1.
redirect_uri
string
Required. The URL in your application where users are sent after authorization.
sample code:
Example responses:
Last updated