Call an API - Consent required

Hello,
I am adding authentication to a simple react app and want to call a protected API. I have followed this tutorial but i get the error Consent required. I can’t figure out how to display the consent prompt. I have tried getTokenWithPopup instead of getAccessTokenSilently but it is undefined.
How can I display the prompt for consent?
Any help is appreciated!

Hello, @kasperskov01! Welcome to the Auth0 Community.

This is happening because your authentication request contains a request to provide certain scopes in the Access Token, and you’re attempting to log the user in silently. If the user has not previously consented to the application to use these scopes, this issue will come in, as you are calling a non-interactive flow, and providing consent is an interactive operation.

I recommend that you use these instructions: https://auth0.com/docs/libraries/auth0-react#login

Let me know if this helps.

Thanks!