# Personal access token: connect Claude, ChatGPT or Gemini to your store

How to create a personal access token in CloudCart, which permissions to give Claude, ChatGPT or Gemini, when to add an IP limit and how to revoke it.

Source: https://cloudcart.com/en/blog/ai-assistant-store-management · CloudCart · 2026-11-06

In short: a personal access token (PAT) is the key an AI agent such as Claude Code, ChatGPT Codex or Gemini CLI uses to work in your CloudCart store. Only the store owner creates it, under Settings → PAT Tokens. The token starts with cc_pat_, is shown once, and carries one of three access levels: Read Only, Full Access or Custom Permissions.

This guide covers the key itself: creating it, its permissions, IP limits and revoking it. How to install the agent and what it can do afterwards is on the [CloudCart AI integration](https://cloudcart.com/en/offer/ai) page. Step by step for one agent: [Claude Code and your online store](https://cloudcart.com/en/blog/online-store-with-claude). For OpenAI's agent: [ChatGPT and Codex step by step](https://cloudcart.com/en/blog/online-store-with-chatgpt). Screen and field names below are exactly as the CloudCart admin shows them, and the API limits are on the [developers page](https://cloudcart.com/en/developers).

## What is a personal access token in CloudCart?

A personal access token is the store owner's own access key. The CloudCart Admin GraphQL API and the CloudCart CLI use it to recognise who is sending a request. Every request made with the token acts on behalf of the owner, but only within the permissions, expiry date and IP addresses you set on that token.

The token is a 71-character string: cc_pat_ followed by 64 random hexadecimal characters. The platform stores only its SHA-256 hash, so the value is visible exactly once, in the green "Token Created Successfully!" panel right after you create it. A lost token cannot be recovered: you delete it and create a new one.

### Personal access token or API key: what is the difference?

The personal access token is for AI agents and the Admin GraphQL API, while the API key is for the REST API and permanent integrations. The table shows which one does what:

| Key | Where you create it | What it is for | Permissions |

| Personal access token | Settings → PAT Tokens | AI agents, CloudCart CLI, Admin GraphQL API ( /api/gql ) | Read Only, Full Access or selected resources; expiry date and IP addresses |

| API key | Settings → Api keys | REST API ( /api/v2 ) for external integrations: ERP, automation tools, scripts | The whole store, no split by resource; from Starter Pack up, with a limit per plan |

For an AI agent you need a personal access token.

## Who needs a personal access token, and when?

Every owner who wants an AI agent to read or change the store needs a personal access token, and so does anyone who uses the CloudCart CLI. The feature has no plan restriction: the PAT Tokens screen is the same in Baby Pack, Starter Pack, CC Pro and CC Master.

- You are connecting an agent for the first time. Once you paste the sentence from the "Connect your store to an AI agent" card on the dashboard, the agent installs what it needs and then asks you for two things: the store address and a personal access token.

- You only want reports. An agent that tells you each morning about sales, stock and abandoned carts works fine with a Read Only token.

- You give the agent one part of the store. For example products and stock only, without orders and customers. Custom Permissions does exactly this.

- You work on several computers or with several agents. A separate token for each lets you stop one without touching the others.

- You run a separate store for each country. A token is created in one store's admin and opens that store. If you sell in Germany, Italy and Poland from three stores with their own language and currency, each one gets its own token.

The token is not a staff account and does not count towards the plan's administrator limit: Baby Pack includes 1 administrator, and the agent works without taking a second seat. Prices for all plans are on the [pricing page](https://cloudcart.com/en/pricing).

> Store run by an AI assistant One sentence and one key: the agent is connected CloudCart charges nothing for the connection, and it works with Claude Code, ChatGPT Codex, Cursor, VS Code and Gemini CLI. You pay the agent's own subscription to its provider, and you decide its permissions with the personal access token. How the AI assistant connects →

## How to create a personal access token, step by step

You create a personal access token on the Settings → PAT Tokens screen (the breadcrumb reads Settings → Account → PAT Tokens) or from the user menu at the bottom left → PAT Tokens. You need a token name and an access level; everything else is optional.

- Sign in as the owner. Only the store owner creates and manages tokens. An administrator or moderator gets the refusal "Only store owners can manage CLI tokens", and there is no staff permission that delegates it.

- Open PAT Tokens. At the top you see the counter "N of 100 tokens": up to 100 tokens per owner. If you have no token yet, click Create Your First Token , otherwise Create Token .

- Fill in Token Details. Token Name is required (up to 100 characters): write who it is for, for example "Claude Code, office laptop". Description is optional (up to 500 characters).

- Pick a level under Permissions. Three cards: Read Only (marked "Recommended" and selected by default), Full Access and Custom Permissions . The next section explains which fits which job.

- Open Advanced Settings if you want an expiry date or IP limit. The section is collapsed. Under Token Validity , switch off "No expiration" and pick an end date. Under IP Restrictions , Add IP Address adds up to 20 addresses or ranges.

- Click Generate Token. The "Token Created Successfully!" panel shows the full token with a Copy button. Copy it straight away: after Done the value is gone for good.

- Give the token to the agent. Paste it into the agent's chat when it asks, together with the store address without https:// (for example mystore.cloudcart.net or mystore.com ).

- Test it with a question. The screen has no test button. Ask the agent "How many orders did I get yesterday?". If it answers, the token's Last used at column shows the time of the request.

Important: the token works from any computer for anyone who has it, unless you set IP addresses. Treat it like a password: do not email it, do not screenshot it and do not put it in shared documents.

## Which permissions should the token have?

Start with Read Only and move to wider access when the agent has to change something. This is the principle of least privilege, recommended by both [NIST](https://csrc.nist.gov/glossary/term/least_privilege) and [OWASP](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html): every key gets exactly as much access as its job requires.

| Level | What it allows | When to choose it |

| Read Only | Reads everything, changes nothing. Every change is refused. | Reports, KPIs, stock and order questions, your first days with the agent |

| Full Access | Reads and changes everything in the store | The agent builds the store, writes descriptions, changes prices and settings |

| Custom Permissions | Only the selected resources, each set to None, Read or Read & Write | The agent works in one area, for example products and stock |

Custom Permissions has 8 rows: Products, Orders, Customers, Inventory, Discounts, Blog, Settings and Webhooks. Inventory and Discounts have no read-only option, so an agent that needs to see stock levels gets full Inventory access. If you leave every row at None, the token is saved as Read Only. At the bottom are the shortcuts Select all as Read, Select all as Read & Write and Clear all.

### Which task needs which permissions

The table covers the tasks merchants give an agent most often. The sentences are examples you can paste as they are:

| Task | Sentence for the agent | Minimum permissions |

| Morning report and KPIs | "Compare yesterday's revenue with the same day last week." | Read Only |

| New supplier price list | "Update the prices by SKU and show me which SKUs are missing." | Products: Read & Write |

| Reorder list for a supplier | "Which products have fewer than 5 units left? Make a table." | Products: Read + Inventory |

| Black Friday promotion | "Create a 15% discount on the Winter category until Sunday." | Discounts + Products: Read |

| Post on the store blog | "Write a draft about winter skincare." | Blog: Read & Write |

| Sales by category | "Show me sales by category for October." | Settings: Read (reports sit under Settings) |

The numbers worth tracking and how the agent calculates them are described in [the 10 KPIs of an online store](https://cloudcart.com/en/blog/ecommerce-kpi-metrics-ai-agent).

## What permissions does the agent need for email, ads and metrics?

For marketing the agent needs Settings, because in the Admin GraphQL API the campaigns, apps, SEO settings and store reports sit under that resource. Subscribers and customers sit under Customers. The personal access token opens only your CloudCart store: results in Meta Ads Manager, Google Ads, TikTok Ads Manager and Google Search Console need separate access, which you grant in each service.

| Job | What the agent does in CloudCart | Minimum token permissions | What stays outside the token |

| Email campaign in Marketing Suite | Writes the campaign from real products and prices, picks the subscriber segment, prepares the template | Settings: Read & Write, Customers: Read, Products: Read | Nothing: the campaigns are in the store's Marketing section |

| Meta (Facebook and Instagram) | Checks the Pixel ID and Conversions API under Apps → XML Feed → Facebook, writes ad copy for the best sellers | Settings: Read, Products: Read, Orders: Read | Budgets and ad results in Meta Ads Manager |

| Google Ads and Google Shopping | Improves the titles and descriptions of products that go into the feed, checks Google Dynamic Remarketing and Google Tag Manager | Products: Read & Write, Settings: Read | Campaigns and spend in the Google Ads account |

| TikTok | Checks the TikTok Pixel and TikTok Shop apps and the products that go into the TikTok catalog | Settings: Read, Products: Read | Campaigns and budgets in TikTok Ads Manager |

| Google Search Console | Checks verification under Apps → Google Search Console, writes SEO titles and meta descriptions for products | Products: Read & Write, Settings: Read | Queries, clicks and positions in Search Console |

| Store metrics | Calculates revenue, order count, average order value, share of repeat customers, best sellers and low stock | Read Only | GA4 sessions, if you also want them from there |

Metrics need no screen at all: ask an agent with a Read Only token "What is the average order value for October against September, and which 5 products bring in the most revenue?" and it calculates the numbers from the orders.

Each channel has its own guide: [an email campaign in CloudCart step by step](https://cloudcart.com/en/blog/email-campaign-cloudcart-step-by-step), [Meta ads for an online store](https://cloudcart.com/en/blog/meta-ads-online-store), [Google Ads for an online store](https://cloudcart.com/en/blog/google-ads-online-store), [TikTok Shop and TikTok Ads](https://cloudcart.com/en/blog/tiktok-shop-tiktok-ads) and [Google Search Console for an online store](https://cloudcart.com/en/blog/google-search-console-online-store).

Important: for ad copy and emails the agent does not need to see customers by name. Under the GDPR, personal data must be "limited to what is necessary" for the purpose ([Article 5(1)(c), applicable since 25 May 2018](https://eur-lex.europa.eu/eli/reg/2016/679/oj/eng)), so give Customers: Read only when the task is a subscriber segment or a repeat-customer report.

> Store for €1 €1/month for the first 3 months, with personal access tokens on every plan Personal access tokens and the AI agent work on Baby Pack too, the smallest plan. A new store pays €1/month for the first 3 months on any plan from Baby Pack to CC Master, so you can try the agent on a real store this week. Create a store for €1 →

## Should the token have an IP limit, and how long should it last?

Add an IP limit when the agent works from an address that does not change: an office, a server or a CI pipeline. If you work from a laptop at home and your internet provider gives you a changing address, leave the list empty and set a short expiry date.

- An empty list means the token works from any address. This is the default.

- One address is written as 192.168.1.100 , a whole network as 192.168.1.0/24 (256 addresses). IPv4, IPv6 and CIDR ranges are supported, up to 20 per token.

- A request from another address is refused with IP_NOT_ALLOWED, and the Last used at column does not change. That way the column shows only successful requests.

The expiry date (Token Validity) defaults to "No expiration": the token works until you delete it or switch it off. The end date must be in the future. A sensible practice is 30 to 90 days for a token on a laptop, and no expiry only for a token tied to a server's IP.

## How do you revoke the AI agent's access?

Access stops immediately, on every computer, when you switch off or delete the token on PAT Tokens. The two options have different consequences:

| Action | Where | What happens | Reversible? |

| Switch off (Active) | The toggle on the token's row | Every request is refused; the token stays in the list | Yes: switch it back on and the same token works again |

| Delete | The button on the row, confirmed with "This action cannot be undone." | The hash is destroyed for good | No: you create a new token with a new value |

| cloudcart auth logout | The terminal on the agent's computer | Removes the sign-in on that computer only | Yes, by signing in again |

Switching off is handy for a pause, for example while you are on holiday. Deleting is the right move as soon as you suspect the token has fallen into the wrong hands. Editing does not change the value: for a new key with the same permissions, delete the old one and create a new one.

## What do you gain with a personal access token and an AI agent?

With a well-configured token, a job that takes dozens of clicks becomes one sentence, and the risk stays under control. In a cosmetics store with 300 products, a new supplier price list means checking 300 SKUs and 300 prices. An agent with a Products: Read & Write token compares the SKUs, shows you the differences and changes the prices in one bulk operation that runs in the background.

- Speed. The Admin GraphQL API accepts 300 requests a minute per store address, and bulk changes run as one background job instead of hundreds of separate requests.

- Control. A Read Only token cannot change anything, even if the agent gets a request wrong. The refusal names the exact permission that is missing.

- Traceability. With a separate token for each agent and the Last used at column, you see which key worked when.

How many hours a week this saves a typical store is worked out in [AI agent for an online store: hours and money saved](https://cloudcart.com/en/blog/ai-agent-online-store-why). Bulk changes are described in [bulk price and stock changes with one sentence](https://cloudcart.com/en/blog/bulk-catalog-changes-ai). CloudCart takes [0% commission on sales](https://cloudcart.com/en/offer/zero-commission-ecommerce), so the orders the agent helps you win cost you no percentage to the platform.

> AURA The agent works for you, Aura Chat sells to your customers The personal access token gives your agent access to the admin. For shoppers on the storefront there is AURA: Aura Chat answers and sells in the chat, and Aura Search understands what the shopper is looking for. What AURA does →

## 7 good practices for personal access tokens

- One token per agent or computer. The name says who and where ("Gemini CLI, server"). You stop one without stopping the rest.

- Read Only to start. For the first few days, ask the agent for reports and stock levels. Give Full Access once you have seen how it works.

- Ask it to "show me first". Have the agent list the changes and confirm them before it applies them. A mistake in the request shows up before it reaches the store.

- Turn on daily backups before Full Access. After you copy the sentence from the dashboard, the admin offers a daily backup subscription when the store can have one. With it you restore the whole store, or part of it, to the last daily backup.

- Expiry date for the laptop, IP for the server. A token on a laptop gets 30 to 90 days, a token on a server is tied to its address.

- Review Last used at once a month. Delete any token that has not been used for weeks. The column updates only on a successful request.

- Think about what the provider reads. The agent's provider (Anthropic, OpenAI, Google) processes what the agent reads under the terms of your account with that provider. If the agent does not need your customers, do not give it Customers.

## Mistakes to avoid, and what the refusals mean

The three most common mistakes: closing the window before copying the token, Full Access "just in case" for an agent that only reads reports, and one shared token for every agent.

When the agent cannot do something, the Admin GraphQL API returns a code and a message. The table shows the most common ones:

| Message | Cause | What to do |

| "Invalid or expired token" | Token copied wrongly, switched off or past its expiry date | Switch the token back on, or create a new one and sign the agent in again |

| "Token has been revoked" | The token was deleted on PAT Tokens | Create a new token and give it to the agent |

| "… writes data, which this token's scopes do not allow." | Read Only, or only Read for this resource | A token with Read & Write for the resource |

| "… needs the `inventory` scope, which this token does not have." | The resource is missing from Custom Permissions | Add it in the token's Edit window |

| IP_NOT_ALLOWED | The request comes from an address outside the list | Add the address or clear the list |

| TOO_MANY_REQUESTS (429) | More than 300 requests a minute for the store | Ask the agent for a bulk operation instead of a loop |

In Edit (click the token's name in the list) you change the name, access level, IP addresses and expiry date, and the token's value stays the same. The three CloudCart APIs and the REST API limits by plan are on the [developers page](https://cloudcart.com/en/developers), and general good practice for personal tokens is also described in the [GitHub documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). Questions about your own setup go to support@cloudcart.com.

## Frequently asked questions

**How do I create a personal access token in CloudCart?**

Sign in as the owner and open Settings → PAT Tokens, or the menu at the bottom left → PAT Tokens. Click Create Token, enter a name, choose an access level and click Generate Token. Copy the token straight away, because it is shown only once.

**What permissions should I give an AI agent?**

Start with Read Only, which is marked as recommended and allows no changes. For a task in one area of the store, choose Custom Permissions, for example Products: Read & Write for prices. Give Full Access only to an agent that builds or configures the whole store.

**How do I revoke an AI agent's access to my store?**

Switch off or delete the token on PAT Tokens: access stops immediately, on every computer. Switching off is reversible, deleting is not. On the computer itself, the command cloudcart auth logout removes the saved sign-in.

**What is the difference between a personal access token and an API key?**

The personal access token is for AI agents, the CloudCart CLI and the Admin GraphQL API, with a choice of permissions, expiry date and IP addresses. The API key is for the REST API and fixed integrations such as an ERP, and has access to the whole store. For Claude, ChatGPT or Gemini you need a personal access token.

**Can a staff member create a personal access token?**

No, only the store owner creates personal access tokens, and the right cannot be delegated. A staff member can connect the agent with a browser sign-in instead: the agent then works with that staff member's permissions for 30 days, after which they sign in again.

**Can the AI agent read Meta Ads, Google Ads and Search Console with the token?**

No. The personal access token opens only your CloudCart store: products, orders, customers, Marketing Suite campaigns, apps and reports. The agent reads ad accounts and Search Console data with separate access that you grant in Meta, Google or TikTok.
