Skip to content

Latest commit

 

History

History
83 lines (55 loc) · 2.41 KB

api_endpoints.rst

File metadata and controls

83 lines (55 loc) · 2.41 KB

Authentication

Phone Registration

Send security_code on given phone_number

POST /api/phone/register

NOTE: Hit again for resending the security_code.

Parameters

Name Type Description
phone_number string phone_number of the user. (should contain the country extension as given in example call)

Example

{
    "phone_number": "+9180765XXX10"
}

Response

Status: 200 OK
{
    "session_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpb3NfKzkxOTkxMTcxNTkyOV9zZXNzaW9uX2NvZGUiOiI3MTExNDYifQ.XSIBOsfA6kYd8NUE2MlvhdrOZszoWQdzunOGEU_Wr94"
}

Verify if security_code entered is correct

POST /api/phone/verify

Parameters

Name Type Description
phone_number string phone_number of the user.
security_code string Security code (security_code) for the user
session_token string iOS session token to verify the phone_number

Request

{
    "phone_number": "+9180765XXX10",
    "security_code": "711146",
    "session_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpb3NfKzkxOTkxMTcxNTkyOV9zZXNzaW9uX2NvZGUiOiI3MTExNDYifQ.XSIBOsfA6kYd8NUE2MlvhdrOZszoWQdzunOGEU_Wr94"
}

Response

Status: 200 OK
{
    "message": "Security code is valid."
}