Add Phone Number
Adding pgone number
Endpoint
Base URL
http://localhost:8080
Method and Endpoint
PATCH /api/users/current/add-phone
Headers
Authorization: Bearer access_token
Request Body
Request Body
{
"phone": "02243513444"
}
Responses
You will get responses like this:
200 (success)
Response Body
{
"message": "Add Phone Number Successfully",
}
400 (bad request)
Response Body
{
"error": "Invalid request body"
}
401 (unauthorized)
Response Body
{
"error": "Invalid authorization header"
}
401 (unauthorized - expire token)
Response Body
{
"error": "token is expired: token is expired by 2m19s"
}
404 (not found)
Response Body
{
"error": "user not found"
}
#### 500 (server error)
```json filename="Response Body"
{
"error": "Internal server error"
}
500 (server error)
If something went wrong while update user
data in database
Response Body
{
"error": "Failed to update user"
}