Skip to content
This repository has been archived by the owner on Jan 22, 2023. It is now read-only.

akama-aka/Discord-OAuth2-PHP

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord-OAuth2-PHP

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

It doesn't intend to cover all the functionalities of Discord OAuth2 but rather to be lightweight (only dependency is curl) and easy to use.

Dependency

To use this library, you must first install php-curl

sudo apt-get install php-curl

How to install it ?

$ composer require xwilarg/discord-oauth2-php

You can also see the package on packagist.

Code sample

See the sample section.

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 now ready to write your PHP code, check the sample section to see how to do so.

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

About

PHP Library for Discord OAuth2

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%