# Invalid access token

**URL:** <https://forum.shopware.com/t/invalid-access-token/104416>\
**Category:** Shopware 6 (English)\
**Created:** [1. Juli 2024 um 08:16 UTC](https://forum.shopware.com/t/invalid-access-token/104416 "2024-07-01T08:16:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kstar](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@kstar](https://forum.shopware.com/u/kstar)\
**Post date:** [1. Juli 2024 um 08:16 UTC](https://forum.shopware.com/t/invalid-access-token/104416/1 "2024-07-01T08:16:02Z")

</div>

When I go to download an import or export file, i get this.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/d/4/d4a62ad353aac50be35c573cfa93e9b63ee382a6.png)

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/e/4/e4ed7593d879d09fc54314cd88b8c34f23cd7eb4.png)

How can I fix this. Thanks

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [1. Juli 2024 um 08:40 UTC](https://forum.shopware.com/t/invalid-access-token/104416/2 "2024-07-01T08:40:53Z")

</div>

Looks like a htaccess redirect or something like that removes the header with the access token. Did you check for that?

---

<div class="post-metadata">

**Author:** ![kstar](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@kstar](https://forum.shopware.com/u/kstar)\
**Post date:** [2. Juli 2024 um 13:34 UTC](https://forum.shopware.com/t/invalid-access-token/104416/3 "2024-07-02T13:34:31Z")

</div>

No I am not sure how to check that. I did not change that. How would I be able to see that? What should be there?  
Thanks

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [3. Juli 2024 um 09:31 UTC](https://forum.shopware.com/t/invalid-access-token/104416/4 "2024-07-03T09:31:10Z")

</div>

Open the .htaccess file in your public folder an look if there are any lines above or below the lines that marked as Shopware.

---

<div class="post-metadata">

**Author:** ![kstar](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@kstar](https://forum.shopware.com/u/kstar)\
**Post date:** [4. Juli 2024 um 13:37 UTC](https://forum.shopware.com/t/invalid-access-token/104416/5 "2024-07-04T13:37:10Z")

</div>

Here is all I have there:

#DirectoryIndex index.html index.php  
#DirectoryIndex html index.php

DirectoryIndex disabled

 Options -MultiViews # Restrict access to VCS directories RedirectMatch 404 /\\.(svn|git|hg|bzr|cvs)(/|$)

```
# Restrict access to root folder files
RedirectMatch 404 /(composer\.(json|lock|phar)|README\.md|\.gitignore|.*\.dist|\.env.*)$

```

* * *

I do not have anything else there. Should there be? What would you put there?

Thanks

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [4. Juli 2024 um 16:15 UTC](https://forum.shopware.com/t/invalid-access-token/104416/6 "2024-07-04T16:15:33Z")

</div>

Which Shopware version do you use?

---

<div class="post-metadata">

**Author:** ![kstar](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@kstar](https://forum.shopware.com/u/kstar)\
**Post date:** [4. Juli 2024 um 18:22 UTC](https://forum.shopware.com/t/invalid-access-token/104416/7 "2024-07-04T18:22:51Z")

</div>

thanks for your help. i am using 6.5.6.1

I also tried to change the .htaccess to the following:

DirectoryIndex disabled

 Options -MultiViews # Restrict access to VCS directories RedirectMatch 404 /\\.(svn|git|hg|bzr|cvs)(/|$)

```
# Restrict access to root folder files
RedirectMatch 404 /(composer\.(json|lock|phar)|README\.md|\.gitignore|.*\.dist|\.env.*)$

```

# Add these lines from the working .htaccess

RewriteEngine on  
RewriteCond %{REQUEST\_URI} !^public  
RewriteRule ^(.\*)$ public/$1 [L]

* * *

Still no help. Strange because I have another version 6.5.4.0 and the above .htaccess is working on it. However it doesn’t seem to work on the 6.5.6.1 version or doesn’t matter.

Here is what the screen shows:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/b/8/b82da3a07efdcc08ad3277c8e16f0d724cd32700.png)
