---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/57020#article
headline: "57020: Authorization failed"
url: https://www.twilio.com/docs/api/errors/57020
inLanguage: en
dateModified: 2026-03-25T13:47:45.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 57020: Authorization failed

Log Type: APPLICATION

Log Level: ERROR

## Description

This error appears when Twilio cannot validate the request's `Authorization` header on a Messaging request. Twilio API requests use HTTP Basic authentication, and Twilio recommends API keys and API key secrets for production applications.

### Possible causes

* The request does not include an `Authorization` header.
* The `Authorization` header does not contain valid Twilio API credentials.

### Possible solutions

* Add a valid `Authorization` header to the request and authenticate with HTTP Basic authentication.
* Use an API key and API key secret for production requests.
* For local testing, use your Account SID and Auth Token.

#### Additional resources

* [Twilio API requests](/docs/usage/requests-to-twilio)
* [Basic Authentication](/docs/glossary/what-is-basic-authentication)
