# \[lychee\] 400 Bad Request Header Exception Invalid token

**URL:** https://forum.yunohost.org/t/lychee-400-bad-request-header-exception-invalid-token/23909
**Category:** Support apps
**Tags:** lychee, french
**Created:** [March 2, 2023, 3:14pm UTC](https://forum.yunohost.org/t/lychee-400-bad-request-header-exception-invalid-token/23909 "2023-03-02T15:14:23Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Lep0le](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/l/dec6dc/32.png) [@Lep0le](https://forum.yunohost.org/u/Lep0le)
#### Post date: [March 3, 2023, 9:51am UTC](https://forum.yunohost.org/t/lychee-400-bad-request-header-exception-invalid-token/23909/3 "2023-03-03T09:51:57Z")

</div>

Hello,  
i receive an email from [notifications@github.com](mailto:notifications@github.com)  
He gives us a track:

> My instincts tells me this is because you have a Bearer Token that is used by Yuno.

> [https://github.com/LycheeOrg/Lychee/blob/master/app/Services/Auth/SessionOrTokenGuard.php#L307](https://github.com/LycheeOrg/Lychee/blob/master/app/Services/Auth/SessionOrTokenGuard.php#L307) See here.

> I would suggest to edit your `.env` and set  
> `ENABLE_TOKEN_AUTH` to `false`

> see here: [https://github.com/LycheeOrg/Lychee/blob/master/config/auth.php](https://github.com/LycheeOrg/Lychee/blob/master/config/auth.php)

> This will disable the token authentication and skip this problem.

I find the .env in var

`Preformatted text` : nano /var/www/lychee/.env

**But it don’t work, nano said .env couldn’t be edit…**  
So several questions 🙂

1. Where is the .env file to modify it …?
2. does Yunohost got a token service to modify ?

Thanks for helping

---

_[View the full topic](https://forum.yunohost.org/t/lychee-400-bad-request-header-exception-invalid-token/23909)._
