Documentation
Feedback
Guides
Troubleshooting

Troubleshooting
Troubleshooting
Development

I can't access the Headless CMS

Troubleshoot Headless CMS access errors caused by permissions, authorization, or VTEX IO CLI environment configuration issues.

Keywords: Headless CMS, FastStore, CLI

FastStore users may encounter the following errors after using the commands faststore cms-sync or vtex cms sync.

Error messagePossible causeSolution
Error: Permission deniedThe user role doesn't have the required CMS permissions.Grant user Admin access
Error: User indicated by VtexIdclientAutCookie is not authorized to access the indicated resourceThe user doesn't have access to the required CMS resources in License Manager.Grant user Admin access
Error: SyntaxError: Unexpected tokenThe VTEX IO CLI environment isn't configured correctly.Check VTEX IO CLI environment

Solutions

To solve your issue, follow one of the paths below based on the error message displayed in your CLI.

Grant user Admin access

Use this path when the error is related to authorization or permissions in License Manager.

  1. Open the VTEX Admin and go to Account Settings > User Roles.

    {"base64":"  ","img":{"width":1281,"height":924,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":61403,"url":"https://vtexhelp.vtexassets.com/assets/docs/src/cms-license-manager___57f69d96f44f3d29413f2651df7d98c8.png"}}

  2. Under Roles, select the role associated with the user requesting CMS permissions. For example, Owner (Admin Super).

  3. In Products and Resources, click CMS.

    {"base64":"  ","img":{"width":1820,"height":763,"type":"gif","mime":"image/gif","wUnits":"px","hUnits":"px","length":1569025,"url":"https://vtexhelp.vtexassets.com/assets/docs/src/cms-license-manager-role___f67a8717b5411664dd29cfa9de1764bc.gif"}}

  4. Make sure both See CMS menu on the top-bar and Settings are checked.

  5. Go to the Users section and add the email of the user who needs CMS access.

  6. Click Save.

  7. Ask the user who requested access to run faststore cms-sync or vtex cms sync again.

  8. Confirm the command runs without Error: Permission denied or any authorization errors.

Check VTEX IO CLI environment

Use this path when the error points to CLI execution or environment configuration.

Verify authentication

  1. Open the terminal and run the vtex whoami command.
  2. Confirm that the displayed account and workspace are the ones expected for CMS sync.
  3. If you're not logged in, or if the account or workspace is incorrect, run vtex login and authenticate with the correct account and workspace.

Update VTEX IO CLI

  1. Run the vtex autoupdate command in your terminal.
  2. Run the vtex -v command to check if the VTEX IO CLI and Node versions are updated.

Verify the workspace

  1. Run the vtex workspace list command to see the available workspaces.
  2. If required, switch to the correct workspace with vtex use <workspace-name>.

Retry the sync in verbose mode

  1. After adjusting the environment, run the vtex cms sync command.
  2. If the error persists, run vtex cms sync --verbose to get more details about the sync error.

If the issue continues after that, open a ticket with VTEX Support.

Contributors
3
Photo of the contributor
Photo of the contributor
Photo of the contributor
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
3
Photo of the contributor
Photo of the contributor
Photo of the contributor
Was this helpful?
Suggest edits (GitHub)
On this page