useCheckScopesConsent
The useCheckScopesConsent hook returns the current consent status for scopes declared in your Mini's manifest.json. Use it to decide whether to show the full experience, a gated screen, or a prompt that asks the user to grant access.
Call refetch() after requestScopesConsent() resolves to read the updated status.
Anchor to useCheckScopesConsentuse Check Scopes Consent()
UseCheckScopesConsentReturns
- error
Error | null - grantedScopes
Scopes already granted by the user.
string[] | undefined - loading
boolean - refetch
Re-fetch scope consent status. Call this after `requestScopesConsent()` resolves to get the updated status.
() => Promise<void> - requiredScopes
Required scopes declared by the mini, fetched fresh from the API.
string[] | undefined - status
Consent status derived from comparing required vs granted scopes. - `'granted'` — all required scopes are granted, or none declared - `'partially_granted'` — at least one required scope is granted but not all - `'not_granted'` — no required scopes are granted
CheckScopesConsentResponse['status'] | undefined
CheckScopesConsentResponse
- grantedScopes
string[] - requiredScopes
string[] - status
'granted' | 'partially_granted' | 'not_granted'