curl --request POST \
--url http://co-mind-platform-host/v1/services/token/exchange \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"redirect_uri": "<string>",
"code_verifier": "<string>"
}
'{
"access_token": "<string>",
"refresh_token": "<string>",
"token_type": "bearer",
"expires_in": 3600,
"user": {
"id": "user_abc123",
"email": "user@example.com",
"username": "johndoe",
"confirmed": true,
"created_at": "2023-11-07T05:31:56Z"
}
}Exchange an authorization code for tokens using PKCE flow.
curl --request POST \
--url http://co-mind-platform-host/v1/services/token/exchange \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"redirect_uri": "<string>",
"code_verifier": "<string>"
}
'{
"access_token": "<string>",
"refresh_token": "<string>",
"token_type": "bearer",
"expires_in": 3600,
"user": {
"id": "user_abc123",
"email": "user@example.com",
"username": "johndoe",
"confirmed": true,
"created_at": "2023-11-07T05:31:56Z"
}
}Bearer token authentication. Supports two token types:
POST /v1/auth/loginPOST /v1/api-tokens, format: cmnd_<tokenId>.<secret>