> Documentation index: [Saleor](/llms.txt) · [This section](/api-reference/authentication/llms.txt)
> Source: https://docs.saleor.io/api-reference/authentication/mutations/external-obtain-access-tokens

# externalObtainAccessTokens Mutation

Obtain external access tokens for user by custom plugin.

```graphql
externalObtainAccessTokens(
  input: JSONString!
  pluginId: String!
): ExternalObtainAccessTokens
```

Details

```graphql
type ExternalObtainAccessTokens {
  token: String
  refreshToken: String
  csrfToken: String
  user: User
  accountErrors: [AccountError!]! @deprecated
  errors: [AccountError!]!
}
```

<a id="arguments"></a>

### Arguments

<a id="input"></a>

#### [`input`](#input) ● [`JSONString!`](/api-reference/miscellaneous/scalars/jsonstring.md)

The data required by plugin to create authentication data.

<a id="plugin-id"></a>

#### [`pluginId`](#plugin-id) ● [`String!`](/api-reference/miscellaneous/scalars/string.md)

The ID of the authentication plugin.

<a id="type"></a>

### Type

<a id="externalobtainaccesstokens"></a>

#### [`ExternalObtainAccessTokens`](/api-reference/authentication/objects/external-obtain-access-tokens.md)

Obtain external access tokens for user by custom plugin.
