OAuth 401 Unauthorized

Hello. I’m trying to create a login using Symfony and the OAuth client bundle after creating my own provider it successfully takes me to the oauth/authorize url, once I click allow and I’m redirected back the Patreon response contains an error with a 401 Unauthorized

The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn’t understand how to supply the credentials required.

I cannot figure out what is wrong? My client is setup for V2 API.

To use v2, you must be using v2 client using v2 endpoints with v2 calls. You must have acquired the scope for whatever you will ask from the api. Ie, to receive email info, you must have added the scope to the authorization process while asking the token while logging the user in.

PHP lib’s api function demonstrates this. Note how proper scopes are asked while sending users to login in the readme page’s example as well.