Get an API Key
Learn how to generate API Keys to create authenticated requests to the Mobile Alerts API.
Generate an API Key
API Keys can be generated in the Mobile Text Alerts platform dashboard.
Visit Settings for your account. This is under the three-dot menu in the top right of the platform dashboard.
Select the Developer tab or scroll down to Developer Resources.
Click the GENERATE A NEW KEY button. Enter a name for the new API Key.
Once generated, store this key in a safe place. The key will no longer be available to view after clicking “Accept”.
This API Key is used to make authenticated calls to the Mobile Text Alerts API.
Bearer Token Authentication
This API Key is used as a bearer token when making requests to the API. A bearer token is included in the request header to grant a user or application access to a protected endpoint.
Header structure: "Authorization: Bearer {myAPIKey}"
Example request to verify the API Key
Below is an example cURL
request with a bearer token to the /verify-api-key
endpoint, this will verify the API Key as valid.
curl -L \
-H 'Authorization: Bearer 89fa747a-e01b-5940-99c2-4e96fa996258' \
'https://api.mobile-text-alerts.com/v3/auth/verify-api-key'
If valid, a response will be returned with the message: "API Key verified"
//Example successful response
{"message":"API Key verified",
"data":{"name":"Account111111111","email":"[email protected]"}}
GET /v3/auth/verify-api-key HTTP/1.1
Host: api.mobile-text-alerts.com
Authorization: Bearer apiKey
Accept: */*
{
"statusCode": "MTANoLinkedAccountError",
"success": true,
"error": "text",
"message": "text",
"data": {
"name": "text",
"email": "text"
}
}
Last updated
Was this helpful?