Post
/api/v1/loginCode.redeem
Redeems a one-time OAuth login code and returns the loginToken and userId. Use these values as the X-Auth-Token and X-User-Id headers in authenticated requests.
This endpoint does not require authentication. Each code is single-use, expires after 60 seconds, and is limited to 10 redemption requests per minute per caller.
Changelog
| Version | Description |
|---|---|
| 8.7.0 | Added |
Body parameters
Redeem login code
{
"code": "4f1d2c3b4a5968778695a4b3c2d1e0f1123456789abcdef00fedcba987654321"
}object
code
string Required
The one-time login code issued by the server-side OAuth flow.
Min length64
Max length64
Example4f1d2c3b4a5968778695a4b3c2d1e0f1123456789abcdef00fedcba987654321
Responses
200
OK
Redemption successful
{
"loginToken": "9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq",
"userId": "aobEdbYhXfu5hkeqG",
"success": true
}object
loginToken
string
userId
string
success
boolean
400
Bad Request
Invalid request
{
"success": false,
"error": "must NOT have fewer than 64 characters [invalid-params]",
"errorType": "invalid-params"
}Invalid or expired code
{
"success": false,
"error": "error-invalid-code"
}object
success
boolean
error
string
errorType
string
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}object
status
string
message
string