Skip to main content

Create an OAuth Client for Salesforce Service Cloud Voice

Series: Set up CX Cloud, Digital and AI for Salesforce Service Cloud Voice

Previous suggested step: Create an OAuth Client for Salesforce Service Cloud Voice

Next suggested step: Create a Lightning app for Digital and AI for Salesforce Service Cloud

To allow the Lightning app in Salesforce Service Cloud Voice to receive a token, create an OAuth client. The token allows the app to make requests to the Genesys Cloud API and represents the user’s permissions for the app to access Genesys Cloud data. The app uses tokens when requests to API endpoints require authorization.

  1. Click Admin.
  2. Under Integrations, click OAuth.
  3. Click Menu > IT and Integrations > OAuth.
  4. Click Add client. The Client Details tab appears.
  5. Set App Name to a descriptive name of the app. This name appears when someone this OAuth client.
  6. (Optional) In the Description box, type a brief description of the app.
  7. Next, set the duration of time until tokens created with this client expire. Accept the default duration, or enter a value between 300 and 172800 seconds. This sets the lifetime of the token to a maximum of two days or less.
  8. In the Grant Types field, select one of the following types for the grant. Grant Types set the way that an application obtains an access token:
    • : A single-step authentication process where a user authenticates with Genesys Cloud and the client application directly receives an access token. This option provides less security for the access token than the authorization code grant, but is ideal for client-side browser applications (for example, JavaScript) and most desktop applications (for example, .NET WPF/WinForms or Java desktop programs).
    • /: A two-step authentication process where a user authenticates with Genesys Cloud and the client application is then returned an authorization code. The client application provides OAuth client credentials and uses the authorization code to get an access token. The access token can then be used when making authenticated API calls. This option is the most secure and ideal for websites where:
      • API requests are made on the server-side (for example, ASP.NET or PHP).
      • A thin client in some desktop applications authorizes the user and passes the auth code to a back-end server to exchange it for an auth token and make API requests.
  9. In the Authorised redirect URIs box, enter your Salesforce Service cloud URI for the OAuth configuration depending on the type of grant selected.
    • Token Implicit Grant – Your Salesforce URI format is: https://xxxx.lightning.force.com/lightning/page/home, where xxxx is the name of your Salesforce org.
      Note: If the is set to Yes in the CX Cloud, Digital and AI utility, then the redirect URL uses the static resources in /resource/genesysps__genesysAuthCallback. The URL format is:  https://xxxx.lightning.force.com/resource/genesysps__genesysAuthCallback.
    • PKCE – The URL format is:  https://xxxx.lightning.force.com/resource/genesysps__genesysPKCEAuthCallback, where xxxx is the name of your Salesforce org. You can also get the URI using the GC Digital and AI Integration setup app. For more information, see .
  10. Click the Scope box and then add the following list of scopes to your app:
    • authorization:readonly
    • conversations
    • messaging:readonly
    • notifications
    • presence
    • response-management:readonly
    • routing:readonly
    • upload
    • users:readonly
    • webdeployments:readonly
  11. Click Save. Genesys Cloud creates a Client ID and a Client Secret (token).

CX Cloud setup for PKCE

To get the URI, create the OAuth client and have the client Id ready.

To get the Authorized redirect URI:

  1. On the Setup Home page in Salesforce, click the App Launcher icon.
  2. Search for GC Digital and AI Integration Setup in the Search apps and items box and select the item.
  3. Enter the following details in the Settings tab of the CX Cloud, Genesys Digital and AI for Salesforce Service Cloud Configuration:
    • Genesys Cloud Region
    • Genesys Cloud PKCE Grant Client Id
  4. Click Validate and then Save.

Copy the Authorized redirect URI for later use and add it to the OAuth Client configuration for PKCE.