Generate the Access Token

With the permission granted, you will receive a code which will allow you to retrieve the accessToken authentication and process requests involving another user. Following the OAuth 2.0 Authorization Framework specification this request is made with the attributes in x-www- form-urlencoded, rather than a JSON.

👍

TIP

URL example for access token generation:

https://connect-sandbox.moip.com.br/oauth/token?client_id=APP-M11STAPPOAU&client_secret=SplxlOBeZQQYbYS6WxSbIA&grant_type=authorization_code&code=4d9e0466bc14aad85b894237145b217219e9a825&redirect_uri=http://www.mysite.com.br/redirect

Now that you have your seller's permission to trade on his behalf, you will receive a `` code '' that will allow you to retrieve the authentication accessToken (OAuth token).

🚧

IMPORTANTT

Following the specification of the OAuth 2.0 Authorization Framework, this request is made with the attributes in x-www-form-urlencoded, instead of a JSON. Observe the Header Params settings in the table above to learn how to authorize this request.

Atributos

Name

Description

Details

appId

Unique identifier of the application making the request DEPRECATED

string(4)

appSecret

APP private key DEPRECATED

string(32)

redirectUri

Seller redirect URL (must be the same one used in the permission request action) DEPRECATED

string

grantType

Request type desired. Possible values: AUTHORIZATION_CODE. DEPRECATED

string(18)

accessToken

Authentication token DEPRECATED

string(32)
response

moipAccountId

Wirecard Account id that gave you the permission DEPRECATED

string(16)
response

client_id

APP unique identifier making the request. In the format: APP-M11STAPPOAU

string(4)
mandatory

client_secret

APP private key. The secret attribute that was sent when creating your application

string(32)
mandatory

redirect_uri

Seller redirect URL (must be the same one used in the permission request action).

string
mandatory

grant_type

Request type desired. Possible values: AUTHORIZATION_CODE.

string(18)
mandatory

access_token

Authentication token.

string(35)
response

refresh_token

Token to update the authentication token.

string(35)
response

code

Validation code to retrieve the access token. The code returned to the registered URL when the user gives permission authorization.

string(32)
mandatory

scope

Permissions that have been granted (Possible values according to the resource).

string
response

moipAccount

Wirecard account structure.

structured,
response

└─id

Wirecard account id.

string,
response

Language
Authentication
Basic
base64
: