curl -X POST 'https://api.sandbox.mangopay.com/v2.01/oauth/token/embedded/recipient' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ab08691f2ef34733a8451ed3742d4204' \
-d '{
"clientId": "your-mangopay-client-id",
"claims": {
"userId": "user_m_01JP2X1PK52W8PYD99Q3CXDMAP"
}
}'
{
"access_token": "rec_019bb6b1683d7251b29e56524bcc551e",
"token_type": "Bearer",
"expires_in": 900,
"scope": "bankaccounts:r bankaccounts:w"
}
Authentication
Create an access token for the Recipients embedded experience
Generate an access token to run the Recipients embedded experience using Mangopay Elements
POST
/
v2.01
/
oauth
/
token
/
embedded
/
recipient
curl -X POST 'https://api.sandbox.mangopay.com/v2.01/oauth/token/embedded/recipient' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ab08691f2ef34733a8451ed3742d4204' \
-d '{
"clientId": "your-mangopay-client-id",
"claims": {
"userId": "user_m_01JP2X1PK52W8PYD99Q3CXDMAP"
}
}'
{
"access_token": "rec_019bb6b1683d7251b29e56524bcc551e",
"token_type": "Bearer",
"expires_in": 900,
"scope": "bankaccounts:r bankaccounts:w"
}
This endpoint allows you to obtain an access token that you can use to initialize Mangopay Elements to provide the Recipients frontend experience.
A single access token can be used to service the experience to one user and has a lifespan of 15 minutes. You need to provide the
UserId of the Natural User or Legal User who will use the frontend session to register a Recipient.
Body parameters
string
required
Your Mangopay Client ID.
object
required
Hide child attributes
Hide child attributes
string
Unique identifier of the Natural User or Legal User using the Recipient frontend experience to register a bank account.
Responses
string
The value to use as the
clientToken when initializing Mangopay Elements for the Recipients embedded experience.string
The type of the token (always Bearer).
integer
The number of seconds until the token expires.
string
The API permission scopes of the token, in this case to read and write bank account data.
curl -X POST 'https://api.sandbox.mangopay.com/v2.01/oauth/token/embedded/recipient' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ab08691f2ef34733a8451ed3742d4204' \
-d '{
"clientId": "your-mangopay-client-id",
"claims": {
"userId": "user_m_01JP2X1PK52W8PYD99Q3CXDMAP"
}
}'
{
"access_token": "rec_019bb6b1683d7251b29e56524bcc551e",
"token_type": "Bearer",
"expires_in": 900,
"scope": "bankaccounts:r bankaccounts:w"
}
Was this page helpful?