Skip to main content
Version: 3.0.0

Authenticate token

Generate a new token for the User when the old token has expired

curl --location 'https://partner-apistg.ahamove.com/v3/accounts/token' \
--header 'Content-Type: application/json' \
--data '{
"mobile": "849xxxxxxxx",
"api_key": "<API_KEY_STG>"
}'

HTTP Request

POST https://partner-apistg.ahamove.com/v3/accounts/token

Query Parameters

ParameterTypeRequiredDescription
api_keyStringYesAPI_KEY received after Partner registered for integration
mobileStringYesPhone number registered to the account

Response

JSON response example:

{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhaGEiLCJ0eXAiOiJ1c2VyIiwiY2lkIjoiODQ5MDI5MzMwMjUiLCJzdGF0dXMiOiJPTkxJTkUiLCJlb2MiOiJob2RkQGFoYW1vdmUuY29tIiwibm9jIjoiRG9hbiBEYWkgSG8iLCJjdHkiOiJTR04iLCJhY2NvdW50X3N0YXR1cyI6IkFDVElWQVRFRCIsImV4cCI6MTY5NTI3NjM2OCwicGFydG5lciI6Im9kb28iLCJ0eXBlIjoiYXBpIn0.celDzdkTiNuIjEf_8LDCJHTyK74BuceXB5IYhfHo08I",
"refresh_token": "0c42af2105249b126b80862e96b3b055"
}

Status-Code: 200 OK

Errors

CodeTextDescription
401NOT_AUTHORIZEDThe current account does not belong to this Partner
404USER_NOT_FOUNDAccount not found
404PARTNER_NOT_FOUNDAPI key not found, Partner not found
406INVALID_PHONE_NUMBERInvalid phone number
406DEACTIVATED_ACCOUNTAccount has been deactivated
500INTERNAL_SERVER_ERRORWe had a problem with our server. Try again later
503SERVICE_UNAVAILABLEWe're temporarily offline for maintenance. Please try again later