Create token
Exchange an authorization_code
for an access_token
after receiving on from the redirect_uri
you specifiy after a successful user connection
Body Required
-
The client ID you received when you first created the application
-
The client secret. Since there can be multiple
client_secret
s (to allow for rotation of secrets without downtime to your customers), any currentclient_secret
is validPlease email me after signup and I will set both your client secret and redirect_uri (required) when you reach out.
-
This is a hardcoded value required by the OAuth 2.1 spec
Value is
authorization_code
. -
This is the code you received in the query string
-
Indicates the URI to return the user to after authorization is complete, which is the endpoint on your server to receive the authorization_code.
Must be identical to the redirect URI provided in the original link.
Please email me after signup and I will set both your client secret and redirect_uri (required) when you reach out.
curl \
-X POST https://api.affixapi.com/2023-03-01/management/token \
-H "Content-Type: application/json" \
-d '{"client_id":"00000000-00000000-00000000-00000000","client_secret":"ffffffff-ffffffff-ffffffff-ffffffff","grant_type":"authorization_code","code":"Y2xpZW50IzkzMTU4MGQwLWYwYjctNGJiOC1iYmZmLWI4MTNlYzMxNTVjYXxjb2RlIzE1MmIwYjk3LTg2ZWMtNDZlNC1hZDUyLWY5ZTAxNzE2MDIwNAo=","redirect_uri":"https://example.com"}'
{
"client_id": "00000000-00000000-00000000-00000000",
"client_secret": "ffffffff-ffffffff-ffffffff-ffffffff",
"grant_type": "authorization_code",
"code": "Y2xpZW50IzkzMTU4MGQwLWYwYjctNGJiOC1iYmZmLWI4MTNlYzMxNTVjYXxjb2RlIzE1MmIwYjk3LTg2ZWMtNDZlNC1hZDUyLWY5ZTAxNzE2MDIwNAo=",
"redirect_uri": "https://example.com"
}
{
"access_token": "Y2xpZW50IzkzMTU4MGQwLWYwYjctNGJiOC1iYmZmLWI4MTNlYzMxNTVjYXx0b2tlbiM4ZDY5NzMwZi1kNzI1LTQ1ZjYtYTVlOC1mZmQ0NWE3ZjhkNDE=",
"mode": "xhr",
"provider": "sandbox",
"scopes": [
"identity",
"census"
],
"token_type": "Bearer"
}
{
"message": "string",
"validation_error": "string"
}
{
"message": "string",
"id": "string"
}
{
"code": "string",
"token": "string",
"error": "conflict"
}
# Headers
Retry-After: 42
# Payload
{
"message": "string"
}
{
"message": "string"
}