Latest stories

register

  • Inputs
{
    "device_details": "string: maximum 128 characters: device_details: optional",
    "first_name": "string: 20 characters maximum: cannot left empty",
    "last_name": "string: 20 characters maximum: cannot left empty",
    "phone_code": "string: minimum 5 characters",
    "phone_code_hash": "string: fixed length is 16",
    "phone_number": "phone number: example: +18885559977",
    "user_name": "string between 4 to 40 characters: optional",
    "version": "string: length between 5 and 12 characters: version :optional"
}

  • Errors
{
    "already_registered": "there is an account with these inputs",
    "invalid_name": "first name and/or last name contains unacceptable characters",
    "must_logout": "user must logout",
    "phone_code": [
        {
            "min length is 5": "minimum length of phone code is 5"
        },
        {
            "max length is 5": "maximum length of phone code is 5"
        }
    ],
    "phone_code_hash": [
        {
            "min length is 16": "minimum length of phone code hash is 16"
        },
        {
            "max length is 16": "maximum length of phone code hash is 16"
        }
    ],
    "phone_code_hash_expired": "phone code hash expired or incorrect",
    "phone_number": [
        {
            "null value not allowed": "phone number is not valid"
        }
    ],
    "user_name_is_taken": "input username is already taken by another user",
    "wrong_phone_code": "phone_code is wrong",
    "wrong_username": "input username contains unacceptable characters"
}

  • Extra Description
Create account for the first time or after delete account, it needs phone_code which is provided by send_code

  • Sample
  • Url:
https://api.pantel.me/a/register?phone_number=+1**********&phone_code=*****&phone_code_hash=pr8i5nfexzn8w31c&first_name=john&last_name=doe&user_name=test_username
  • Output:
                                {
    "id": 1002240,
    "set_session_id": "a78425694d41a6b8e8a1e01375b15308",
    "status": "success",
    "time": 1546341449.7019954
}