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

# authenticateDataProvider

> Exchanges a data provider's id and client secret for an access token to write entries to its sources. Needs no sign-in. `UnauthorizedError`: no data provider has that id.



**mutation** `authenticateDataProvider(input: AuthenticateDataProviderInput!): AuthenticateDataProviderPayload!`

## Arguments

**`input`**: `AuthenticateDataProviderInput!` (required)

## Returns

`AuthenticateDataProviderPayload!`

**`authenticatedToken`**: `AuthenticatedToken`

---

**`errors`**: `[AuthenticateDataProviderError!]`

## Examples

```graphql Mutation
mutation AuthenticateDataProvider($input: AuthenticateDataProviderInput!) {
  authenticateDataProvider(input: $input) {
    authenticatedToken {
      accessToken
      expiresIn
    }
    errors {
      __typename
      ... on GraphQlError {
        code
        details {
          __typename
        }
        message
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "dataProviderId": "id",
    "secret": "string"
  }
}
```

```json Response
{
  "data": {
    "authenticateDataProvider": {
      "authenticatedToken": {
        "accessToken": "string",
        "expiresIn": 1
      },
      "errors": [
        {
          "__typename": "GraphQlError",
          "code": "string",
          "details": [
            {
              "__typename": "KeyValuePairOfStringAndString"
            }
          ],
          "message": "string"
        }
      ]
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.