Do not know how to start integrating?
Check the first stepsPOST
REQUIRED
REQUIRED
REQUIRED
400Error
invalid_client
The provided client_id and/or client_secret of your app is invalid.
invalid_grant
There are several reasons for this error, it could be because the authorization_code or refresh_token is invalid, expired or revoked, was sent in an incorrect flow, belongs to another client, or the redirect_uri used in the authorization flow does not match what your application has configured.
invalid_scope
The requested scope is invalid, unknown, or wrongly formed. The allowed values for the scope parameter are “offline_access”, ”write” or ”read”.
invalid_request
The request does not include a required parameter, includes an unsupported parameter or parameter value, has a duplicated value, or is otherwise malformed.
unsupported_grant_type
Allowed values for grant_type are “authorization_code” or “refresh_token”.
forbidden
The call does not authorize access, possibly another user's token is being used.
unauthorized_client
The application does not have a grant with the user or the permissions (scopes) that the application has with this user do not allow creating a token.
429Error
local_rate_limited
The call does not authorize access, please try again.
Did you find this information useful?
Yes
Not
curl -X POST \
'https://api.mercadopago.com/oauth/token'\
-H 'Content-Type: application/json' \
-d '{
"client_secret": "client_secret",
"client_id": "client_id",
"grant_type": "client_credentials",
"code": "TG-XXXXXXXX-241983636",
"code_verifier": "47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU",
"redirect_uri": "https://www.redirect-url.com?code=CODE&state=RANDOM_ID",
"refresh_token": "TG-XXXXXXXX-241983636",
"test_token": "false"
}'
{
"access_token": "APP_USR-4934588586838432-XXXXXXXX-241983636",
"token_type": "bearer",
"expires_in": 15552000,
"scope": "read write offline_access",
"user_id": 241983636,
"refresh_token": "TG-XXXXXXXX-241983636",
"public_key": "APP_USR-d0a26210-XXXXXXXX-479f0400869e",
"live_mode": true
}