Initiate user auth with SMS
POST/auth/user/sms
Base URL: https://api.tinkermode.com
Initiate the authentication process by triggering an SMS text to a user. The text contains an auth code for the user to exchange for an authentication token.
This API call is only allowed for projects with phone number-based user accounts.
Authentication
This endpoint does not require authentication.
Request body
Content type: application/x-www-form-urlencoded
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
phoneNumber | string | Yes | Phone number of user to be authenticated. It needs to be registered already on MODE cloud by Create User API call. | |
projectId | integer | Yes | ID of project to which the user belongs. |
Request example
phoneNumber=%2B17149999999&projectId=1260Responses
200 SMS message successfully sent.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
recipient | string | No | read-only (server-generated) | Phone number receiving the SMS message. |
Response example
{
"recipient": "+17149999999"
}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. |