title: "Access token does not contain openid scope" in AWS Cognito
body: <p>I am running a working AWS Cognito service on a frontend application which can successfully do the basic stuff - login, logout, signup, etc..</p>
  
  <p>Right now I am trying to get user attributes through the backend API, such that:</p>
  
  <p>1) The user login in the application and gets a JWT.</p>
  
  <p>2) The JWT is being sent to the backend server.</p>
  
  <p>3) The server has to extract the email of the user by using the access token</p>
  
  <p>The closest thing that I found to what I need is <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/userinfo-endpoint.html" rel="noreferrer">this</a> Cognito service.</p>
  
  <p>So I am making a GET request to "<a href="https://mydomain.auth.eu-central-1.amazoncognito.com/oauth2/userInfo" rel="noreferrer">https://mydomain.auth.eu-central-1.amazoncognito.com/oauth2/userInfo</a>"
  With Authorization Header as they are asking for, but I keep getting this response:</p>
  
  <blockquote>
    <p>{
        "error": "invalid_token",
        "error_description": "Access token does not contain openid scope"
    }</p>
  </blockquote>
  
  <p>I have tried searching for this error but couldn't find any explanation about the error.</p>
  
  <p>Thanks by advance</p>