Skip to content
GurtOS

Make an Apple Watch token

POST
/devices/self/watch
curl --request POST \
--url http://127.0.0.1:7700/api/devices/self/watch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example" }'

Only a device that paired as iphone. Returns a separate token for its Apple Watch, with the iPhone’s Business person and nothing more. It is never the owner’s, so Settings, keys, setup, apps and devices are refused. It cannot vouch for a SpacetimeDB identity, and it approves only up to Settings watchLimitCents. A new Watch token replaces the old one, three an hour per iPhone. Revoking the iPhone revokes it too.

Media typeapplication/json
object
name

The Watch’s name. Default <phone name>'s Watch.

string
<= 40 characters

Example generated

{
"name": "example"
}

The Watch’s token.

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

Example generated

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

The caller is not the iPhone app.

Media typeapplication/json
object
error
required

What went wrong

string

Example generated

{
"error": "example"
}

This iPhone added a Watch three times this hour.

Media typeapplication/json
object
error
required

What went wrong

string

Example generated

{
"error": "example"
}