Getting An Access Token
You need an access token in order to use this API.
For example:
Authorization: Bearer alEw85xBVY83owVraNwNxzsfmpXu
The token is valid for 59 minutes and 59 seconds. It can be used for multiple requests.
The bearer tokens can only be used for a specific country. For example: If you generate a token for a UK mobile number, you cannot use it to query a German mobile number.
For more information on using Authorization Basic, see RFC 6749.
If the request is valid, the API returns an access_token, along with expiry and scope information.
This access token can then be used in one or more requests for as long as the token remains valid.
If the request is not valid, the APIs returns an error message.
MSISDNs For The Sandbox Environment
In the Vodafone API Sandbox, specific Mobile Station International Subscriber Directory Numbers (MSISDNs) are provided to test various scenarios across different APIs. Each MSISDN is designed to simulate a particular condition or response, allowing developers to test their applications comprehensively.
- When using these MSISDNs, ensure your application correctly interprets and handles each Response, providing appropriate responses or actions based on the simulated conditions.
- These test numbers are designed to help you validate your application's robustness and reliability when interacting with Vodafone's APIs under different conditions.
By thoroughly testing with these MSISDNs, you can ensure that your application behaves as expected across a wide range of real-world scenarios, leading to a more reliable and user-friendly experience.
MSISDN | Response | Description |
---|---|---|
447772000002 447772000004 |
TRUE | The number is associated with Vodafone. |
447772000001 447772000006 |
Unknown User | The MSISDN does not correspond to any subscriber. Use these for error handling unknown users. |