Access_denied error


#1

Hello, after some time I’ve been working on a Patreon oauth client for HumHub & Yii2 users and ran into an access_denied error, maybe I could get some help with understanding or even fixing this issue.

Patreon Oauth

Error Logs


#2

Hey Felli,

Sure thing! can you provide more context?

Spencer
Patreon Platform Team


#3

Hello Spencer, at this time I’ve been trying to create a useful integration with the Oauth of Patreon (Seen here) but once I fix one thing another thing breaks and gives an error as seen on our GitHub repo link above which is an access_denied, I don’t believe I missed anything but if I did please do guide me into the right place. :slight_smile:


#4

Hey Felli,
Unfortunately I can’t address your code directly, but if you have a specific question I’d be happy to answer it.

On first blush it looks like you’re using a third party library to handle oauth, but I don’t see any of the code that actually handles the Oauth in here outside of the oauth link. Have you followed all of the instructions here https://docs.patreon.com/#oauth?


#5

All yii\authclient\OAuth2 is, is an abstract class that serves as a client for the OAuth 2 flow, but from the looks of it it’s an issue with the following;

401	Unauthorized
Authentication failed (bad API key, invalid OAuth token, incorrect scopes, etc.)

This leads me to believe that either;

  1. Not providing default scopes is the issue or
  2. The generated API key or Oauth token aren’t working the way they should, or
  3. All the above.

I’ll continue looking into this but I’m sure that the code should work the way it’s intended to work. :smile:


#6

I’m seeing the same issue… did you resolve this?

I simply receive ‘access denied’.


#7

@mcdoolz the error is almost certainly due to sending incorrect values to the api. You should first verify that you’re providing the correct values for each field, and if you’re confident they’re correct or if you’re not sure what values to send then please share the code you’re using (with the values redacted) and a little explanation of what you’re trying to do so that guidance can be provided.

If you’re not working with Yii2 then you may find it easier to create your own topic because then it will get more attention and you will get help faster :blush: