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..."
}
'
{
  "projectAdmin": {
    "subject": "local:admin",
    "username": "admin"
  },
  "accessToken": "<string>",
  "csrfToken": "<string>"
}

Body

application/json
code
string
required

Authorization code or JWT from the Insforge

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Response

Cloud authorization verified, admin session created

projectAdmin
object
accessToken
string

Internal JWT for admin authentication

csrfToken
string

CSRF token for /api/auth/admin/refresh