Skip to content
GurtOS

Trade a sign-in code for a device token

POST
/sso/redeem
curl --request POST \
--url http://127.0.0.1:7700/api/sso/redeem \
--header 'Content-Type: application/json' \
--data '{ "code": "example" }'

Preview. Open without a token, so the body is capped at 1 MB. The device token is bound to the person, exactly as pairing a phone for them makes one.

Media typeapplication/json
object
code
required
string

Example generated

{
"code": "example"
}

The device token.

Media typeapplication/json
object
token
required
string
device
required
object
id
string
name
string
person
string
box
required
object
id
string
name
string

Example generated

{
"token": "example",
"device": {
"id": "example",
"name": "example",
"person": "example"
},
"box": {
"id": "example",
"name": "example"
}
}

The code is unknown, used or expired.

Media typeapplication/json
object
error
required

What went wrong

string

Example generated

{
"error": "example"
}

The sign-in was refused, or the person was removed. The message gives the reason.

Media typeapplication/json
object
error
required

What went wrong

string

Example generated

{
"error": "example"
}