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

PropertyTypeRequiredConstraintsDescription
phoneNumberstringYesPhone number of user to be authenticated. It needs to be registered already on MODE cloud by Create User API call.
projectIdintegerYesID of project to which the user belongs.

Request example

phoneNumber=%2B17149999999&projectId=1260

Responses

200 SMS message successfully sent.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
recipientstringNoread-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

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

403 Request failed because of invalid data or denied permission.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

429 Request failed because of rate limit.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

500 An unexpected error has occurred.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

503 The service is temporarily unavailable.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.