# Authentication Examples

# Login

Postman example: tonic-showcase/Authentication/login

This will log you in

curl -X POST \
  https://api.advertiser.tonic.com/v1/auth \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: d214ff2c-1820-49d3-8549-458942025d09' \
  -H 'cache-control: no-cache' \
  -d '
{
	"email": "<your-email>",
	"password": "<your-password>"
}'

If your credentials were correct you will receive your token like this:

{
	"token": "<api-token>"
}

Otherwise it will look like this:

{
	"error":"INVALID_LOGIN",
	"message":"Username or Password not correct!"
}

After you successfully received a token the other requests are using it automatically.

Last Updated: 9/30/2020, 2:50:43 PM