# OAuth1

### Introduction <a href="#introduction" id="introduction"></a>

OAuth1 has been replaced by [OAuth2](https://locoia.gitbook.io/connectors/authentication-types/oauth2) and is only used by very few Connectors.

If both OAuth1 and OAuth2 are available for an API, always use OAuth2

### Header <a href="#header" id="header"></a>

Here the header used by e.g. Trello:

```json
{
  "token_in_header": true,
  "content_type": "application/json",
  "header_key": "Authorization",
  "token_format": "{{token}}",
  "token_prefix": "{{token_format}}"
}
```

### Authentication Configuration <a href="#authentication-configuration" id="authentication-configuration"></a>

The authentication configuration is very similar to OAuth2. Here is an example based on Trello:

```json
{
  "oauth1": {
    "auth_form": [],
    "config": {
      "client_id": "CLIENT_ID for OAuth1 app",
      "client_secret": "CLIENT_SECRET for OAuth1 app",
      "extra_access_url": {},
      "extra_authorization_url": {
        "scope": "read,write",
        "expiration": "never",
        "name": "Locoia"
      },
      "authorization_base_url": "https://trello.com/1/OAuthAuthorizeToken",
      "access_token_url": "https://trello.com/1/OAuthGetAccessToken",
      "request_token_url": "https://trello.com/1/OAuthGetRequestToken"
    }
  }
}
```
