> For the complete documentation index, see [llms.txt](https://docs.tryterra.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tryterra.co/help-center/help-topics/no-data/auth-scopes-user-id-matching/missing-or-insufficient-scopes-on-auth.md).

# Why does my redirect fail with missing\_scopes?

These errors mean the **end user did not grant the scopes the integration requires**, so have them reauthenticate and grant the missing access.

By error:

* **`missing_scopes` redirect failure:** the minimum required scopes weren't granted. For Oura, the `email` scope is mandatory because a hash of the email is the unique account identifier.
* **500 from the athlete fetch endpoint:** usually the `profile` scope wasn't granted, so profile data can't be returned.
* **403 mentioning the diary key on MyFitnessPal nutrition:** the user changed their diary key after connecting and must reauthenticate.

Confirming the granted scopes for the user is the quickest verification.

{% hint style="info" %}
For providers like Huawei, the available scopes are limited to those the provider granted your client credentials, so also verify scope grants in the provider's developer console. See [handling authentication events](https://docs.tryterra.co/health-and-fitness-api/user-authentication/handling-authentication-events).
{% endhint %}
