# 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"
    }
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.locoia.com/connectors/authentication/oauth1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
