---
title: "customerAccessTokenCreateWithSocialLogin"
description: "Creates a customer access token using a third-party authentication token."
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/storefront-api/customers/mutations/customer-access-token-create-with-social-login'
  md: 'https://developer.shopline.com/docs/storefront-api/customers/mutations/customer-access-token-create-with-social-login.md'
---
# customerAccessTokenCreateWithSocialLogin

Creates a customer access token using a third-party authentication token.

- **API Version:** v20270301
- **API Type:** Storefront
- **API Protocol:** GraphQL
- **Operation Type:** Mutation

## Type Signature

`CustomerAccessTokenCreateWithMultipassPayload`

## Arguments

* `input`

  [CustomerAccessTokenCreateWithSocialLoginInput](https://developer.shopline.com/docs/storefront-api/customers/inputs/customer-access-token-create-with-social-login-input.md)

  input param

## Returns

* `customerAccessToken`

  [CustomerAccessToken](https://developer.shopline.com/docs/storefront-api/customers/objects/customer-access-token.md)

  Customer AccessToken

* `customerUserErrors`

  [[CustomerUserError!]!](https://developer.shopline.com/docs/storefront-api/customers/objects/customer-user-error.md)

  Error Message

## Code Example

```graphql
mutation customerAccessTokenCreateWithSocialLogin($input: CustomerAccessTokenCreateWithSocialLoginInput ) {
	customerAccessTokenCreateWithSocialLogin(input: $input ) 
		 {
			# CustomerAccessTokenCreateWithMultipassPayload fields
		}
		
	}

```

## Variables

```json
{
  "input": {
    "authUrl": "",
    "loginChannel": {},
    "loginPlatformType": "",
    "token": "",
    "tokenType": ""
  }
}
```

## Examples

### customerAccessTokenCreateWithSocialLogin

Creates a customer access token using a third-party authentication token.

**Request:**

```json
mutation customerAccessTokenCreateWithSocialLogin {
  customerAccessTokenCreateWithSocialLogin(input: {loginPlatformType: "web",authUrl: "https://demo.myshopline.com/user/signIn",loginChannel: "google",tokenType: "oauth2",token:"demo token"}) {
    customerAccessToken {
      accessToken
      expiresAt
    }
    customerUserErrors {
          code
          field
          message
    }
  }
}
```

**Response:**

```json
{
  "data": {
    "data": {
      "customerAccessTokenCreateWithSocialLogin": {
        "customerAccessToken": {
          "accessToken": "demo accessToken",
          "expiresAt": "2024-11-26T12:22:32.936Z"
        },
        "customerUserErrors": []
      }
    }
  }
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/storefront-api/overview.md#status-and-error-codes).

