All endpoints will generate a response with this status code when valid authentication credentials are not provided.
For example, this is the response you'd see if credentials were missing or improperly formatted:
{
"detail": "Authentication credentials were not provided."
}
This is the response you'd see if the format was correct but the API key provided was invalid:
{
"detail": "Invalid token."
}
Solution
Make sure your request includes an Authorization header, the value of which should contain your API key (see format below).
--header 'Authorization: Token YOUR_PROVIDER_TOKEN'