Function to verify api key and get auth token
https://rest.crmango.com/api/Login
Bearer
varchar
Api key
This endpoint takes no body parameters
Function validates your api key and returns an authentication token
auth_token
varchar
Authentication token that you can use to call other functions
curl --request GET \
--url 'https://rest.crmango.com/api/Login' \
--header 'Authorization: Bearer apikey'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://rest.crmango.com/api/Login',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer apikey'
),
));
$response = curl_exec($curl);
echo $response;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://rest.crmango.com/api/Login");
xhr.setRequestHeader("Authorization", "Bearer apikey");
xhr.send();
import requests
url = "https://rest.crmango.com/api/Login"
payload = {}
headers = {
'Authorization': 'Bearer apikey'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
{
"code": 200,
"auth_token": "47478d2cf0a301607ec57d..."
}
{
"code": "int",
"message": "string"
}