Reputation: 25
This is the requirement from the API's documentation
This is the Curl command of getting the clients in their documentation
curl -i -X GET -H "X-KEYALI-API:{API_KEY}" -u {API_USERNAME}:{API_PASSWORD} https://aliphia.com/v1/api_public/clients/
So, I need to implement the same thing in Python
Upvotes: 0
Views: 402
Reputation: 2118
import requests
headers = {
'X-KEYALI-API': '{API_KEY}',
}
response = requests.get('https://aliphia.com/v1/api_public/clients/', headers=headers, auth=('{API_USERNAME}', '{API_PASSWORD}'))
Upvotes: 1