Skip to main content
POST
/
api
/
auth
/
admin
/
sessions
/
exchange
Exchange cloud provider authorization code for admin session
curl --request POST \
  --url https://api.example.com/api/auth/admin/sessions/exchange \
  --header 'Content-Type: application/json' \
  --data '
{
  "code": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
'
{
  "user": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "email": "[email protected]",
    "metadata": {},
    "emailVerified": true,
    "providers": [
      "<string>"
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "accessToken": "<string>"
}

Body

application/json
code
string
required

Authorization code or JWT from the Insforge

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Response

Cloud authorization verified, admin session created

user
object
accessToken
string

Internal JWT for admin authentication