Access token from webapp not working for api

Hello everyone,

I am trying to have a flask webapp authenticate users and then have that app talk to a separate flask api. Below are links to both the flask web app and flask api (both are auth0 tutorial repos btw):

Flask WebApp

Flask Api

When I try to make a call inside the flask webapp to talk to the flask api I get the following error:

{
    "code": "invalid_claims",
    "description": "incorrect claims,please check the audience and issuer"
}

What exactly am I doing wrong here? For reference here is the code I’ve used to make the call from webapp to api:

import http.client

conn = http.client.HTTPConnection("localhost:3010")

headers = { 'authorization': "Bearer MY_ACCESS_TOKEN_FROM_WEBAPP_USER" }

conn.request("GET", "/api/private", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Hi @StuBeezy,

Welcome to the Community!

Can you share the decoded token with us? Remove any sensitive data. jwt.io can be helpful for debugging tokens.

Thanks,
Dan