title: 400 bad request error while calling ejabberd api
body: <p>I am getting 400 bad request error while calling "/api/get_roster" endpoint of ejabberd. I had kept "get_roster" in the scope while requesting the oauth token. </p>
  
  <p><a href="https://i.stack.imgur.com/h8rHq.png" rel="nofollow noreferrer">400 bad request error in ejabberd</a></p>
  
  <p>I guess there is some issue with the permissions. Here is my configuration file:</p>
  
  <p><a href="https://www.dropbox.com/s/his89bx39qhvr1h/ejabberd2.yml?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/s/his89bx39qhvr1h/ejabberd2.yml?dl=0</a></p>
  
  <p>I have tried to follow the official documentation. As per the API permission guide, I have also tried adding following properties:</p>
  
  <pre><code>api_permissions:
    - "Admin access":
      - who:
        - admin
      - what
        - "\*"
        - "!stop"
  </code></pre>
  
  <p>But there was no change. I have following questions:</p>
  
  <ol>
  <li>What am I doing wrong here?</li>
  <li>What are possible scopes?</li>
  </ol>