# Receiving 403 Forbidden from .well-known/jwks.json endpoint

**URL:** <https://community.auth0.com/t/receiving-403-forbidden-from-well-known-jwks-json-endpoint/44881>\
**Category:** Get Help\
**Tags:** jwt, auth0\
**Created:** [June 17, 2020, 9:17pm UTC](https://community.auth0.com/t/receiving-403-forbidden-from-well-known-jwks-json-endpoint/44881 "2020-06-17T21:17:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![XfiJSXIUvu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/xfijsxiuvu/32/17272_2.png) [@XfiJSXIUvu](https://community.auth0.com/u/XfiJSXIUvu)\
**Post date:** [June 17, 2020, 9:17pm UTC](https://community.auth0.com/t/receiving-403-forbidden-from-well-known-jwks-json-endpoint/44881/1 "2020-06-17T21:17:32Z")

</div>

I am following [this tutorial by auth0](https://auth0.com/blog/developing-restful-apis-with-python-and-flask/#securing-python-apis) to implement access token verification in a python flask app running on Google App Engine (flex).

However I am receiving HTTP 403 Forbidden from this code:

```
jwks = requests.get(f"https://{domain}/.well-known/jwks.json").json()

```

I can confirm that the URL being sent is the correct one, and that when I call this with this python on my local system I receive the correct JSON. It is only when being run on the server does this return 403 forbidden.

---

<div class="post-metadata">

**Author:** ![karen1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/karen1/32/18279_2.png) [@karen1](https://community.auth0.com/u/karen1)\
**Post date:** [June 22, 2020, 5:22pm UTC](https://community.auth0.com/t/receiving-403-forbidden-from-well-known-jwks-json-endpoint/44881/2 "2020-06-22T17:22:50Z")

</div>

Good afternoon,

I see that you submitted a support ticket as well. Were you able to try to remove the f before the url? **https://{domain}/.well-known/jwks.json** ​​​​​​ is a public URL so it should be accessible.

Thanks!

---

<div class="post-metadata">

**Author:** ![XfiJSXIUvu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/xfijsxiuvu/32/17272_2.png) [@XfiJSXIUvu](https://community.auth0.com/u/XfiJSXIUvu)\
**Post date:** [June 26, 2020, 9:59am UTC](https://community.auth0.com/t/receiving-403-forbidden-from-well-known-jwks-json-endpoint/44881/3 "2020-06-26T09:59:03Z")

</div>

I believe the cause of this was that I was proxying the custom domain through CloudFlare. I could access the data I needed by using the direct domain provided by auth0, and if I used a different User-Agent I could stop the 403. I suspect Cloudflare is blocking ranges from Google Cloud Platform with a generic user agent from making these requests.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [June 26, 2020, 10:59am UTC](https://community.auth0.com/t/receiving-403-forbidden-from-well-known-jwks-json-endpoint/44881/4 "2020-06-26T10:59:32Z")

</div>

Glad you have found it and thank you for sharing with the rest of community!
