OAuth Apple Authorize
OAuth Apple Authorize API
Overview
This API endpoint allows you to login to your Xellar Embedded wallet account using apple account.
- HTTP Method: POST
- Endpoint v2:
/api/<VERSION>/auth/apple
Request Body Parameters
credential
(required): Credential token (id_token) from apple login.expireDate
(optional): The expiration date for the JWT token generated from the response.
Example Request Body
{
"credential": "eyJraWQiOiJXNldjT0tCIiwiYWxnIjoiUlMyNTYi...",
"expireDate": "2024-01-02"
}
Request
Request Headers
x-client-secret
(required): Client secret which was generated when register in Xellar Embedded API Service Dashboard.
Example Request Syntax
Response
The response will include a JSON object with the following properties:
status
(number): The HTTP status code of the response (e.g., 200 for success).message
(string): A message providing additional information about the operation.data
(object): An object containing theaccessToken
andisWalletCreated
. If the account already has an embedded wallet, the response will includewalletToken
(alsorefreshToken
if using v2) andisWalletCreated
.- rampableAccessToken : JWT token used to access the Rampable Operation endpoint. This token will only be available if the account already create a rampable account and the organization has enabled the rampable feature.
Example Response (if account do not have an Embedded wallet)
{
"status": 200,
"message": "ok",
"data": {
"rampableAccessToken": "your_rampable_access_token_here",
"accessToken": "eyy9afadeasf31....",
"isWalletCreated": false
}
}
Example Response (if account already have an Embedded wallet)
{
"status": 200,
"message": "ok",
"data": {
"rampableAccessToken": "your_rampable_access_token_here",
"walletToken": "eyy9afadeasf31....",
"isWalletCreated": true
}
}
Example Response (if account already have an Embedded wallet in v2)
📝
This response only works on v2
{
"status": 200,
"message": "ok",
"data": {
"rampableAccessToken": "your_rampable_access_token_here",
"walletToken": "eyy9afadeasf31....",
"refreshToken": "eysfsfsffssf1....",
"isWalletCreated": true
}
}