# Troubleshooting

<Accordion title="My authorization link shows 400 Bad Request">
  If your authorization link returns a 400 Bad Request error, ensure the following:<ul>  <li>The `client_id` is correct and matches the one provided in your app's settings.</li>  <li>The scopes you are requesting are registered and valid for your app in the dashboard.</li>  <li>If you are including the `redirect_uri` parameter, verify that it matches the one registered for your app in the dashboard.</li>  <li>Ensure that the URL is properly constructed and encoded if you are creating it manually.</li></ul>
</Accordion>

<Accordion title="My server responds with an invalid_grant error">
  <ul>
      

    <li>If you included a `redirect_uri` in your authorization link, you must also include it in your request for an access token.</li>

      

    <li>Ensure your environment variables are loading, and you're sending the correct `client_id` and `client_secret`.</li>

      

    <li>Make sure you have a fresh `code` value, these tokens are single-use and can not be used again. Also, the token is only valid for 15 minutes after it has been granted.</li>
  </ul>
</Accordion>

<br />