JumpCloud: exchange the code
Overview
Trade the one-time code for a session token.
Called by the dashboard on landing.
You'll need the code.
Returns a token. On success the browser is redirected to the dashboard's /rs-sso-login/ page with the new bearer token in the token query parameter; there is no JSON body. The code works once, and expires 2 minutes after it was issued by default.
Prerequisites
- The
codefrom JumpCloud: callback.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
GET /api/v1/auth/sso/exchange
Authentication
Public (no token)
- The one-time
codeis the credential. - The user must still have JumpCloud sign-in turned on when the code is redeemed; otherwise
400.
Rate limit
10 requests per minute, counted per client IP address. See Rate limits.
Request parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
code | query | string | Yes | The one-time code from the callback redirect. 32 to 128 characters. |
Request body
None.
Request payload
None.
Response body
None. On success the response is a 302 redirect.
| Header | Description |
|---|---|
Location | The dashboard's /rs-sso-login/ page, with the bearer token for the user in the token query parameter. |
Response payload
HTTP/1.1 302 Found
Location: https://production.shoutaboutus.com/rs-sso-login/?token=<access-token>Examples
Success payload
See Response payload.
Error payload
400 Invalid or expired code
The code is unknown, already used or expired, or the user can no longer sign in with JumpCloud.
{
"message": "Invalid or expired SSO code.",
"status": "error",
"errors": []
}422 code missing
{
"message": "The code field is required.",
"errors": {
"code": [
"The code field is required."
]
}
}422 code too short
{
"message": "The code field must be at least 32 characters.",
"errors": {
"code": [
"The code field must be at least 32 characters."
]
}
}429 Too many requests
{
"message": "Too Many Attempts."
}| Status | Meaning |
|---|---|
302 | Signed in: redirect to the dashboard with the token. |
400 | The code is unknown, already used or expired, or the user can no longer sign in with JumpCloud. |
422 | code is missing, or not 32 to 128 characters. |
429 | More than 10 requests in a minute from your IP address. |
500 | Unexpected server error. |
Example request
curl --request GET \
--url "https://production-api.shoutaboutus.com/api/v1/auth/sso/exchange?code=<one_time_code>" \
--header 'Accept: application/json'Updated 17 days ago
Did this page help you?
