---
title: "CookieGenerateByAccessTokenPayload"
description: "Generate cookie response content as a login state cookie on the web page"
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/storefront-api/customers/objects/cookie-generate-by-access-token-payload'
  md: 'https://developer.shopline.com/docs/storefront-api/customers/objects/cookie-generate-by-access-token-payload.md'
---
# CookieGenerateByAccessTokenPayload

Generate cookie response content as a login state cookie on the web page

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

## Type Signature

`CookieGenerateByAccessTokenPayload`

## Fields

* `cookieDomainLevel`

  [Int](https://developer.shopline.com/docs/storefront-api/common/scalars/int.md)

  Cookie written to domain level, 1: written to the first level domain name, 2: written to the second level domain name

* `cookies`

  [[CookieInfo]](https://developer.shopline.com/docs/storefront-api/common-objects/objects/cookie-info.md)

  cookie content

* `customerUserErrors`

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

  Error message

* `httpOnly`

  [Boolean](https://developer.shopline.com/docs/storefront-api/common/scalars/boolean.md)

  whether need to write httpOnly

* `maxAge`

  [Int](https://developer.shopline.com/docs/storefront-api/common/scalars/int.md)

  cookie validity period, in seconds

* `uid`

  [ID](https://developer.shopline.com/docs/storefront-api/common/scalars/id.md)

  customer id

## Schema Definition

```graphql
type CookieGenerateByAccessTokenPayload { 
	cookieDomainLevel: Int
	cookies: [CookieInfo]
	customerUserErrors: [CustomerUserError!]!
	httpOnly: Boolean
	maxAge: Int
	uid: ID 
}
```

## Field from

* [Mutation](https://developer.shopline.com/docs/storefront-api/customers/mutations/cookie-generate-by-access-token.md).cookieGenerateByAccessToken

  根据AccessToken生成cookie

## 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).

