Skip to content
PHP Library for Discord OAuth2
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Discord-OAuth2-PHP is a small PHP Discord to use Discord OAuth2.

It doesn't intend to cover all the functionalities of Discord OAuth2 but rather to be lightweight (no dependencies!) and easy to use.

How to install it ?

$ composer require xwilarg/discord-oauth2-php

How to use it ?

At first you need to go in the Discord developer page and create a new application.
Go in General Information and take your "client id" and "client secret", we will need them later.
Then go in OAuth2, in "Redirects" press the "Add Redirect" button and enter your redirection URL here (the page when the user will be redirected once he is logged with Discord)

You're ready to write your PHP code now, you can go here to see an example.

If you have any question, feel free to open an issue.

You can’t perform that action at this time.