Confused about OAUTH


I’m new to working with oauth etc.

  • working with API in general.
    So please keep that in mind.

I created a Discord Bot that includes a shop and some custom items.
I would like to reward my patrons with items on Discord and not doing it manually

  • getting patron’s Discord ID (I believe api gives you user’s discord information, fix me if I’m wrong)

I read through Patreon API Documentation and I am stuck on oauth part.
If I understood it correctly - I need to have button somewhere on my website
to authenticate the user.
What if I don’t have a website? Can I by any chance
have users authenticate when they pledge?
Or am I completely not understanding the concept?

Big thank you in advance to anyone
who helps me understand this!


To have users login (or connect their account) via Patreon, you will need to have a way to initialize the oAuth login process.

It doesnt matter how you start it as long as you send the user to permission flow, and then get the user’s info via oAuth at the end. Including tokens.

This may be started via a link, via a button, or via an automatic redirect, in however way which your app can receive the info sent by the API. (access and refresh tokens and their details at the end).

To see a working example of this, you can test drive Patreon’s WP plugin

It has oAuth login and pledge/unlock flows built in. The code within it also shows how you can integrate these stuff.

Patreon PHP lib is a much more minimalist and easier lib to examine and take as an example on how to build such an oAuth login or pledge flow, however: