Partner Authentication
Authentication APIs for partners
Partner Authentication
Request Body
Name
Type
Description
{
"status": "PASS",
"api_key": "Bj143Lm09qjQ"
}{
"status": "FAIL",
"message": "Sample Error Message"
}{
"email": "[email protected]",
"password": "1234"
}Base64 Encoding
import base64
import requests
auth_string = "email:password"
auth_string_bytes = auth_string.encode('ascii')
base64_bytes = base64.b64encode(auth_string_bytes)
base64_string = base64_bytes.decode('ascii')
url = 'https://blowhorn.com/api/customer/auth'
headers = {'Authorization': base64_string}
response = requests.get(url, headers=headers)
api_key_string = response.json().get('api_key')
api_key_bytes = api_key_string.encode('ascii')
b64_bytes = base64.b64decode(api_key_bytes)
api_key = b64_bytes.decode('ascii')<?php
$auth_str = "email:password";
$base64_str = base64_encode($auth_str);
$url = 'https://blowhorn.com/api/customer/auth';
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Authorization: ' . $base64_str)
);
$result = curl_exec($ch);
$data = json_decode($result);
$api_key_string = $data->api_key;
$api_key = base64_decode($api_key_string);
?>Last updated
Was this helpful?