{"meta":{"title":"Troubleshooting authorization request errors","intro":"When obtaining an OAuth token for a user, some errors may occur during the initial authorization request phase.","product":"Apps","breadcrumbs":[{"href":"/en/apps","title":"Apps"},{"href":"/en/apps/oauth-apps","title":"OAuth apps"},{"href":"/en/apps/oauth-apps/maintaining-oauth-apps","title":"Maintaining OAuth apps"},{"href":"/en/apps/oauth-apps/maintaining-oauth-apps/troubleshooting-authorization-request-errors","title":"Troubleshoot authorization"}],"documentType":"article"},"body":"# Troubleshooting authorization request errors\n\nWhen obtaining an OAuth token for a user, some errors may occur during the initial authorization request phase.\n\n## Application suspended\n\nIf the OAuth app you set up has been suspended (due to reported abuse, spam, or a mis-use of the API), GitHub will redirect to the registered callback URL using the following parameters to summarize the error:\n\n    http://your-application.com/callback?error=application_suspended\n      &error_description=Your+application+has+been+suspended.+Contact+support@github.com.\n      &error_uri=/apps/building-integrations/setting-up-and-registering-oauth-apps/troubleshooting-authorization-request-errors/%23application-suspended\n      &state=xyz\n\nTo solve issues with suspended applications, please contact us through the [GitHub Support portal](https://support.github.com).\n\n## Redirect URI mismatch\n\nIf you provide a `redirect_uri` that doesn't match what you've registered with your application, GitHub will redirect to the registered callback URL with the following parameters summarizing the error:\n\n    http://your-application.com/callback?error=redirect_uri_mismatch\n      &error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.\n      &error_uri=/apps/building-integrations/setting-up-and-registering-oauth-apps/troubleshooting-authorization-request-errors/%23redirect-uri-mismatch\n      &state=xyz\n\nTo correct this error, either provide a `redirect_uri` that matches what you registered or leave out this parameter to use the default one registered with your application.\n\n### Access denied\n\nIf the user rejects access to your application, GitHub will redirect to\nthe registered callback URL with the following parameters summarizing\nthe error:\n\n    http://your-application.com/callback?error=access_denied\n      &error_description=The+user+has+denied+your+application+access.\n      &error_uri=/apps/building-integrations/setting-up-and-registering-oauth-apps/troubleshooting-authorization-request-errors/%23access-denied\n      &state=xyz\n\nThere's nothing you can do here as users are free to choose not to use\nyour application. More often than not, users will just close the window\nor press back in their browser, so it is likely that you'll never see\nthis error."}