Try to change user Data (400 Bad Request)

I try change user data (name, email, nickname and picture), but response is 400 Bad Request
My request:

const data: any = await axiosInstance.patch(
        https://MY_DOMAIN/api/v2/users/ + req.query.id,
        {
            name: req.body.name,
            email: req.body.email,
            nickname: req.body.nickname,
            picture: req.body.picture,
            connection: "Username-Password-Authentication"
        },
        {
            headers: {
                "content-type": "application/json",
                "Authorization": `Bearer ${req.cookies.appSession}`
            }
        }
    )

Response: 
data: {
      statusCode: 400,
      error: 'Bad Request',
      message: 'Bad HTTP authentication header format',
      errorCode: 'Bearer'
    }

Hi @ph1,

Are you sending a JWT with req.cookies.appSession? That naming scheme suggests you are sending a cookie when you should be sending a JWT bearer token.

All problems was because i need to use this token:

https://auth0.com/docs/tokens/management-api-access-tokens/get-management-api-access-tokens-for-production

Thanks for the update! Let us know if you have any other questions.