> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Oauth1 authentication

> Used to make for HTTP requests that require OAuth 1 authentication.

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Authenticates a connection with services that use OAuth 1. There are two ways to do this, and you pick one with the authentication type. **Three-legged** OAuth is for services that require a user to log in and grant permission; you reference a token you obtained through that login flow. **One-legged** OAuth is for direct system-to-system access, where you sign each request yourself with a consumer key and secret plus an access token and secret.

This documentation describes: [Schema](/schemas/http-authentication-configurator/oauth1-bearer)

## Fields

<FormField property="oAuthType" label="OAuth Authentication Type" required>
  How the connection authenticates. Choose **Three Legged** when a user login and permission are required, or **One Legged** for direct system access. Defaults to **Three Legged**. Your choice decides which fields appear below.
</FormField>

### Three Legged

<FormField property="token" label="Token" required diType="oauth1-token-reference">
  The OAuth 1 token reference obtained through the user login flow. Select an existing token reference here; Alumio uses it to sign each request.
</FormField>

### One Legged

<FormField property="signature" label="Signature" required diType="oauth1-signature">
  The method used to sign and secure requests. Select the signature type the service expects.
</FormField>

<FormField property="consumerKey" label="Consumer key" required>
  The public identifier provided by the service for your application. You can store the value in an environment variable and reference it here.
</FormField>

<FormField property="consumerSecret" label="Consumer secret" required>
  The private key used to sign requests, provided by the service. Keep it private; you can store it in an environment variable and reference it here.
</FormField>

<FormField property="accessToken" label="Access token">
  The access token provided by the service. You can store the value in an environment variable and reference it here.
</FormField>

<FormField property="accessTokenSecret" label="Access token secret">
  The secret paired with the access token, used to securely sign requests. Keep it private; you can store it in an environment variable and reference it here.
</FormField>

## Sample data

This feature configures a connection rather than transforming data, so there is no before/after to show. A one-legged setup looks like this:

| Field                     | Value                      |
| ------------------------- | -------------------------- |
| OAuth Authentication Type | `one_legged`               |
| Consumer key              | `your-consumer-key`        |
| Consumer secret           | `your-consumer-secret`     |
| Access token              | `your-access-token`        |
| Access token secret       | `your-access-token-secret` |

```json Configuration theme={null}
{
  "prototype": "oauth1-bearer",
  "parameters": {
    "oAuthType": "one_legged",
    "signature": {
      "prototype": "oauth1-hmac-sha1"
    },
    "consumerKey": "your-consumer-key",
    "consumerSecret": "your-consumer-secret",
    "accessToken": "your-access-token",
    "accessTokenSecret": "your-access-token-secret"
  }
}
```
