Text a sign-in code
POST
/auth/phone/code
const url = 'https://api.tradeops.cc/v1/auth/phone/code';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"identifier":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tradeops.cc/v1/auth/phone/code \ --header 'Content-Type: application/json' \ --data '{ "identifier": "example" }'Sends a six-digit code to the member’s phone. The code lasts 10 minutes. The response is the same whether or not the number is registered. Each number can ask 3 times in 15 minutes.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
RequestPhoneCodeRequest
object
identifier
required
The member’s phone number or staff ID.
string
Example generated
{ "identifier": "example"}Responses
Section titled “Responses”Media typeapplication/json
object
message
required
string
Example
{ "message": "If this number is registered, we've sent a code."}Validation error
Media typeapplication/json
object
message
required
Errors overview.
string
errors
required
A detailed description of each field that failed validation.
object
key
additional properties
Array<string>
Example generated
{ "message": "example", "errors": { "additionalProperty": [ "example" ] }}