Getting Started with OAuth
Log in with Role2 account
To make your app support "Log in with Role2 account", follow these steps:
- Create an app on the App Management page, and you'll get the
app_id. - Add a regular secret key (not a secure secret key) to your app, and you'll get the
app_secret. - Redirect the user to:
https://www.role2.com/auth/oauth?oauth_redirect_uri=https://www.your-domain.com/callback. - After the user logs in, they will be redirected to the specified address with a temporary
code, for example:https://www.your-domain.com/callback?code=8hYt692Ppo90a. - Retrieve the user's token using
https://role2.api.role2.com/call/oauth/access_token,- Parameters:
app_id- app identifierapp_secret- app secretcode- thecodeparameter received through the callback URL
- Returns:
type- token typeauthorization- token valuesigner- account basic information
- Parameters:
