ABtesting.ai requires that you authenticate by sending an API Token with each request to grant you access to the API.
In order to get the token, you will need to to do a POST to the https://api.abtesting.ai/login
endpoint with the following parameters:
Parameter | Description |
---|---|
The email you used to sign up. | |
password | The password you used to sign up. |
import requests
body = {'email': 'someemail@example.com', 'password': 'somepassword'}
res = requests.post('https://api.abtesting.ai/login', json=body)
token = res.json()['response']['user']['authentication_token']
{
"meta":{
"code":200
},
"response":{
"user":{
"authentication_token":"WyI4IiwiJDUkcm91bmRzPTUzNTAwMCRjb2xQWWpRV3dmLkZaQldHJHNBNHJWT24vUUxocUw5L0hHbmdlQllpOEZOTmtELkFLcktyL0trUWdtM0IiXQ.YK_rjg.tKnPceiy5UFFKRV9I4bWwiEVxvs",
"id":"1234"
}
}
}