Connecting your application with FreJun using OAuth 2.0
Build the authentication URL with the client id provided and send the user to that URL as follows:
<authorization_endpoint>?client_id=<client_id>
authorization_endpoint is FreJun’s oauth authorization endpoint and client_id is what you obtained from FreJunOnce the user reaches the FreJun’s authorization page, the user will be prompted to login to FreJun ( if not logged in already ) and will be redirected to a consent page where the user can Accept or Decline
On Accept, the user will be redirected to the callback URL provided while creating the app with code attached as query param as follows:
<callback_url>?code=<authorization_code>
Note: authorization_code is valid only for 10 minutesOn Decline, the user will be redirected to the callback URL provided while creating the app with code attached as empty string as follows:
<callback_url>?code=
The authorization_code obtained will be used to get the access_token and refresh_token by invoking the AccessToken endpoint of FreJun as follows:
<obtain_access_token_endpoint>?code=<authorization_code>
For creating an Application, mandatory details would be
Parameter | Description |
Name | App name |
Redirect URI or Callback URI | The URL, users will be redirected to after granting access to the app. |
Once the submitted details are verified, an app would be created and provide you the necessary credentials to get you initiated with the OAuth 2.0 Integration
Client Id = <client_id>
Client Secret = <client_secret>
Callback Url = <callback_url>
FreJun’s authorization endpoint is
https://product.frejun.com/oauth/authorize/ -> <authorization_endpoint>