- Exchange an authentication token
Exchanges an authentication token for a JWT.
By default, this operation invalidates the exchanged authentication token.
Specifies if the token must be invalidated after the exchange is performed.
One-time password that is sent by email. This value must contain digits only.
{ "documents": [ "identity-proof", "address-proof" ], "redirectUrl": "https://mywebsite.com" }
- Mock serverhttps://www.rebilly.com/_mock/catalog/all/authentication-tokens/{token}/exchange
- Sandbox serverhttps://api-sandbox.rebilly.com/organizations/{organizationId}/authentication-tokens/{token}/exchange
- Live serverhttps://api.rebilly.com/organizations/{organizationId}/authentication-tokens/{token}/exchange
- SecretApiKey
- JWT
- PublishableApiKey
curl -i -X POST \
'https://www.rebilly.com/_mock/catalog/all/authentication-tokens/{token}/exchange' \
-H 'Content-Type: application/json' \
-H 'REB-APIKEY: YOUR_API_KEY_HERE' \
-d '{
"invalidate": true,
"oneTimePassword": "123456",
"acl": [
{
"scope": {
"organizationId": [
"organizationId-id-1"
]
},
"permissions": [
"PostFile",
"StorefrontGetAccount",
"StorefrontGetWebsite",
"StorefrontGetKycDocument",
"StorefrontPostKycDocument"
]
}
],
"customClaims": {
"documents": [
"identity-proof",
"address-proof"
],
"redirectUrl": "https://mywebsite.com"
},
"expiredTime": "2019-08-24T14:15:22Z"
}'Authentication token exchanged for a JWT.
Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.
ID of the customer resource.
{ "documents": [ "identity-proof", "address-proof" ], "redirectUrl": "https://mywebsite.com" }
Date and time when the resource is created. This value is set automatically when the resource is created.
Date and time when the resource is updated. This value is set automatically when the resource is updated.
Date and time when the session expires. The default value is one hour after the createdTime value.
{ "id": "jwt_0YV7DEJX80CDRAKVTV478ZNJDR", "type": "customer", "token": "string", "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF", "acl": [ { … } ], "customClaims": { "documents": [ … ], "redirectUrl": "https://mywebsite.com" }, "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "expiredTime": "2019-08-24T14:15:22Z", "_links": [ { … } ] }