Gigya Job Openings

Template_gs REST api getToken parameters

Skip to end of metadata
Go to start of metadata

Parameters for grant_type=authorization_code:

RequiredNameTypeDescription
grant_type stringauthorization_code
codestring

The verification code received from the login response (Read more in Use case 3 flow).

  • If the code parameter is not passed, an error Missing_required_parameter (errorCode 400002) is returned.
  • If an invalid code parameter is passed, an error Invalid_parameter_value (errorCode 400006) is returned.
redirect_uristringThis parameter is used for validation. The URL must be the same redirect_uri provided in the login request (Read more in Use case 3 flow).
regSourcestring

Records the source of the registration. The default value is the URL of the current page but it can be any string value. regSource is stored in the account and can be used by verification emails to determine which page should be opened (see accounts.set Policies). Can also be set via the Global Conf object.

 

Parameters for grant_type=client_credentials:
(You may use a user or application key and corresponding secret only using this method or 'none', below)

RequiredNameTypeDescription
grant_type stringclient_credentials
x_siteUIDstring

You may provide the UID of the user that has been logged in by your site. This will generate an access token associated with the user and will allow you to invoke REST API methods, without passing the UID parameter.

When passing this parameter, this method becomes equivalent to the socialize.notifyLogin API method, notifying the Gigya service that the user has been logged-in by the site. Note that any providerSessions parameter will be ignored and if a user is not yet logged in, this will not automatically log the user in.

x_userInfoJSON string

This parameter is relevant only if the x_siteUID parameter (see above) is specified.
This parameter allows you to provide Gigya with site's user profile data. This will ensure consistent user experience. Gigya will use this information, for example, in Plugins that show user info, such as the Chat and the Comments Plugins.
The object may include the following fields: nickname, photoURL, thumbnailURL, firstName, lastName, gender, age, email.
For example:

x_siteUID=12345&userInfo;={firstName:"David", gender:"male", age:30}
x_sessionExpirationintegerThe time in seconds that Gigya should keep the session valid for the user. To end the session when the browser closes, assign the value '0'. If this parameter is not specified, the session will be valid forever.
regSourcestring

Records the source of the registration. The default value is the URL of the current page but it can be any string value. regSource is stored in the account and can be used by verification emails to determine which page should be opened (see accounts.set Policies). Can also be set via the Global Conf object.

 

 

Parameters for grant_type=none:
(You may use a user or application key and corresponding secret only using this method or 'client_credentials', above)

RequiredNameTypeDescription
grant_type stringnone
x_siteUIDstring

You may provide the UID of the user that has been logged in by your site. This will generate an access token associated with the user and will allow you to invoke REST API methods, without passing the UID parameter.

When passing this parameter, this method becomes equivalent to the socialize.notifyLogin API method, notifying the Gigya service that the user has been logged-in by the site. Note that any providerSessions parameter will be ignored and if a user is not yet logged in, this will not automatically log the user in.

x_userInfoJSON string

This parameter is relevant only if the x_siteUID parameter (see above) is specified.
This parameter allows you to provide Gigya with site's user profile data. This will ensure consistent user experience. Gigya will use this information, for example, in Plugins that show user info, such as the Chat and the Comments Plugins.
The object may include the following fields: nickname, photoURL, thumbnailURL, firstName, lastName, gender, age, email.
For example:

x_siteUID=12345&userInfo;={firstName:"David", gender:"male", age:30}
x_sessionExpirationintegerThe time in seconds that Gigya should keep the session valid for the user. To end the session when the browser closes, assign the value '0'. If this parameter is not specified, the session will be valid forever.
regSourcestring

Records the source of the registration. The default value is the URL of the current page but it can be any string value. regSource is stored in the account and can be used by verification emails to determine which page should be opened (see accounts.set Policies). Can also be set via the Global Conf object.