Profile API
- September 2, 2022
- AmpenetSolutions
- 0
You can use the Ampenet SMS Profile API to access your total remaining SMS units, utilized SMS units, and profile information.
API Endpoint
https://sms.ampenet.com/api/v3/me
Parameters
PARAMETER | REQUIRED | DESCRIPTION |
---|---|---|
Authorization | When calling our API, send your api token with the authentication type set as Bearer (Example: Authorization: Bearer {api_token}) | |
Accept | Set to application/json |
View SMS Units
Viewing the SMS units information.
API Endpoint
https://sms.ampenet.com/api/v3/balance
Example Request (PHP)
curl -X GET https://sms.ampenet.com/api/v3/balance \
-H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd'
Returns (JSON)
Returns a contact object if the request was successful.
{
"status": "success",
"data": "sms unit with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
View Profile
View profile information.
API Endpoint
https://sms.ampenet.com/api/v3/me
Example Request (PHP)
curl -X GET https://sms.ampenet.com/api/v3/me \
-H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd'
Returns (JSON)
Returns a contact object if the request was successful.
{
"status": "success",
"data": "profile data with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}