Get API Key
This document will detail how to obtain an existing API key.
POST /auth/getkey
POST /auth/getkeyGet your currently available api-key from your Mobivate account.
curl -X POST \
"https://api.mobivatebulksms.com/auth/getkey" \
-H 'Content-Type: application/json' \
-d '{ "username": "[USERNAME]", "password": "[PASSWORD]"}'import requests
headers = {
'Content-Type': 'application/json',
}
json_data = {
'username': '[USERNAME]',
'password': '[PASSWORD]',
}
response = requests.post('https://api.mobivatebulksms.com/auth/getkey', headers=headers, json=json_data)
# Note: json_data will not be serialized by requests
# exactly as it was in the original request.
#data = '{ "username": "[USERNAME]", "password": "[PASSWORD]"}'
#response = requests.post('https://api.mobivatebulksms.com/auth/getkey', headers=headers, data=data)Headers
Content-Type
application/json
Authorization
No Auth
Body
username
string
Yes
Your username used to login.
password
string
Yes
Your password used to login.
Response
We use conventional HTTP response codes to indicate the success or failure of an API request. In general:
2xx indicate success 4xx indicate an error that failed given the information provided (e.g., a required parameter was omitted) 5xx errors indicate an error with ours servers (these are rare).
{
"apiKey":"abcd1234-9922-abcd-1234-abcd1234abcd"
}{
"code":401,
"message":"Invalid Credentials"
}Upon a successful send request, our server will respond with a 200 (success) HTTP response code, and you will be provided with an API Key. The API Key will be used in subsequent calls to the API.
To see a full list of our Response codes, please click here.
Last updated
Was this helpful?