Code Monkey home page Code Monkey logo

discord-oauth2-php's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.