This is the requirement from the API’s documentation
- A HTTPS connection is needed to use the API. This means that you will require a secure SSL/TLS connection to be able to communicate with our API Server.
This is the Curl command of getting the clients in their documentation
JavaScript
x
2
1
curl -i -X GET -H "X-KEYALI-API:{API_KEY}" -u {API_USERNAME}:{API_PASSWORD} https://aliphia.com/v1/api_public/clients/
2
So, I need to implement the same thing in Python
Advertisement
Answer
JavaScript
1
8
1
import requests
2
3
headers = {
4
'X-KEYALI-API': '{API_KEY}',
5
}
6
7
response = requests.get('https://aliphia.com/v1/api_public/clients/', headers=headers, auth=('{API_USERNAME}', '{API_PASSWORD}'))
8