Admin
Create a token
Changed onMakes a signed token for a client. SensApp does not keep tokens: the answer is the only time the token is shown, it cannot be listed or revoked, and it is valid until it expires or until the secret that signed it is rotated out (see SENSAPP_JWT_PREVIOUS_SECRETS). Requires the admin scope. An admin token cannot make another admin token: those come from sensapp generate-token, which needs the secret. Not available when authentication is disabled.
post/api/v1/admin/tokens
Request
- The document declares no server URL.
- Auth: HTTP bearer
Request body
Example request
{
"duration_seconds": 86400,
"scope": [
"read",
"write"
],
"sensors": [
"temperature",
"humidity"
],
"subject": "edge-device-7"
}Response
The token
Changes
- info
the endpoint scheme security
bearerwas added to the API
- info
- info
endpoint added
- info