/
v3.0.11Get access

getSocialNetworkFrontUrl

This API is used to initiate a Social Login / OAuth2 authentication flow (specifically for Google in the example). It takes the desired social network and a destination URL, and returns the pre-constructed OAuth authorization URL that the frontend needs to redirect the user to.

Request parameters:

NameDescriptionTypeValuesDefault
redirectUrl
This is the URL where the social provider should send the user after they successfully log in on the social network's page.string--
networkType
The social platform you want to authenticate with.string"google", "twitter", "facebook", "telegram"-
This method is usually used with these methods:

Call example:

getSocialNetworkFrontUrl()

Response example:

{
  StatusCode: '0',
  Data: {
    ApplicationKey: '742651053297-aig6rcqvq1cnl45e36unpe82jq9dkdul.apps.googleusercontent.com',
    RedirectUrl: 'https://staging-web.xyz',
    Url: 'https://accounts.google.com/o/oauth2/v2/auth?client_id=742651053297-aig6rcqvq1cnl45e36unpe82jq9dkdul.apps.googleusercontent.com&redirect_uri=https://staging-web.xyz&scope=https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile&response_type=code&prompt=consent&access_type=offline'
  }
}

Response parameters:

NameDescriptionTypeValues
Url
The core output. This is the fully constructed Google OAuth 2.0 authorization URL.string-
RedirectUrl
Confirms the exact whitelist URL the social provider will redirect back to.string-
ApplicationKey
The Client ID provided by the social network (Google, in this case) for your application.string-