# API and reverse proxy authentication

**URL:** <https://forum.gitea.com/t/api-and-reverse-proxy-authentication/7284>\
**Category:** API/SDK/Tea/HelmChart/Terraform\
**Created:** [May 16, 2023, 3:10pm UTC](https://forum.gitea.com/t/api-and-reverse-proxy-authentication/7284 "2023-05-16T15:10:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sed](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@sed](https://forum.gitea.com/u/sed)\
**Post date:** [May 16, 2023, 3:10pm UTC](https://forum.gitea.com/t/api-and-reverse-proxy-authentication/7284/1 "2023-05-16T15:10:08Z")

</div>

My gitea sever is configured to delegate the authentication to a reverse proxy using ENABLE\_REVERSE\_PROXY\_AUTHENTICATION.

However, it seems that it is not compatible with the Basic Authentication which is used by the api when generation tokens. I got the following message:

```auto
{
  "message": "auth required",
  "url": "https://gitea.....ivalua.com/api/swagger"
}

```

Any idea of this issue or a way to workaround it ?

Thank you

---

<div class="post-metadata">

**Author:** ![wxiaoguang](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/wxiaoguang/32/2280_2.png) [@wxiaoguang](https://forum.gitea.com/u/wxiaoguang)\
**Post date:** [May 16, 2023, 3:19pm UTC](https://forum.gitea.com/t/api-and-reverse-proxy-authentication/7284/2 "2023-05-16T15:19:36Z")

</div>

If I remember correctly, a token is necessary …

---

<div class="post-metadata">

**Author:** ![sed](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@sed](https://forum.gitea.com/u/sed)\
**Post date:** [May 16, 2023, 3:41pm UTC](https://forum.gitea.com/t/api-and-reverse-proxy-authentication/7284/3 "2023-05-16T15:41:02Z")

</div>

The token generation endpoint is specific and requires basic authentication :  
[Generating and listing API tokens](https://docs.gitea.io/en-us/development/api-usage/#generating-and-listing-api-tokens)
