Skip to main content
POST
/
sessions
Create a session
curl --request POST \
  --url https://sandbox.api.btdx.io/sessions \
  --header 'Content-Type: application/json' \
  --data '
{
  "appId": "ANAPPID",
  "walletId": "OPTIONAL-ONLY-IF-APIKEY-IS-TYPE-WALLET",
  "apiKey": "password1234"
}
'
{
  "_meta": {
    "_primary_document": "sessions",
    "_count": 1
  },
  "sessions": [
    {
      "accessToken": "eyJ0eXAiOiJh....bBDA",
      "refreshToken": "eyJ0eXAiOiJy....uHCQ",
      "accessExpiresAt": "2099-01-01T23:59:59.999Z",
      "refreshExpiresAt": "2099-01-01T23:59:59.999Z"
    }
  ]
}

Body

application/json
appId
string
required

The ID of the app

apiKey
string
required

The API key secret

walletId
string

If using an API key of type WALLET, please supply the ID of the wallet

Response

OK

_meta
object
sessions
object[]