Getting Started
Base API URL
The base API url is https://tbe.thuprai.com
.
Authentication
You should have received a long-lived API token from Thuprai. This token is required to authenticate all API requests. If you haven't received the API auth token yet, please contact us at reach@awecode.com.
The auth token needs to be passed in Authorization
header for each request. The header value should be in the form - Bearer <auth-token>
.
Request Header | Header Value |
---|---|
Authorization | Bearer <your-auth-token> |
Authentication Example
cURL
bash
curl -X GET \
https://tbe.thuprai.com/v2/consumer/<endoint>/ \
-H 'Authorization: Bearer <your-auth-token>'
1
2
3
2
3
Python
python
import requests
url = 'https://tbe.thuprai.com/v2/consumer/<endpoint>/'
headers = {'Authorization': 'Bearer <your-auth-token>'}
response = requests.get(url, headers=headers)
print(response.text)
1
2
3
4
5
2
3
4
5
Authentication Failure
When authentication fails, the api responds with status 401
or 403
. Different kinds of authentication failures are documented here.