Authentication by sudo
POST/auth/sudo
Base URL: https://api.tinkermode.com
A special endpoint for project administrator to assume the identity of a user to log into an app (a practice commonly known as "sudo"). This is useful for troubleshooting user issues. The caller must first obtain a sudo authorization token, usually from the project's "admin server". The User Session resulted from sudo will automatically expire after 30 minutes. This API call is not allowed for BYOU projects.
Authentication
This endpoint does not require authentication.
Request body
Content type: application/x-www-form-urlencoded
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
token | string | Yes | Sudo authorization token. |
Responses
200 Sudo access granted.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
auth2FToken | string | No | read-only (server-generated) | Token used for completing the two-factor authentication process. Token will expire within 3 minutes |
expirationTime | string | No | read-only (server-generated); format: date-time | This property is present if token has an expiration time. |
sudoer | string | No | read-only (server-generated) | This property is present if client is authenticated via sudo. |
token | string | No | read-only (server-generated) | Access token to be used in the HTTP Authorization header in future API requests. |
userId | integer | No | read-only (server-generated) | This property is present if token is associated with a user. |
401 Authorization is required to access this resource.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
403 Request failed because of invalid data or denied permission.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
429 Request failed because of rate limit.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
500 An unexpected error has occurred.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
503 The service is temporarily unavailable.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |