How to create a SalesForce Connected App

To connect to Salesforce, you'll need to manually define Vonage AI Studio as a connected app, either within your Salesforce production or Sandbox org.

Here’s how to get around creating a connected app:-

  1. Add a new connected app If you use Salesforce Lightning Experience, look for the little gear icon on the top right of the page and select Setup. Then on the left navigation bar, under Platform Tools, click on Apps and then App Manager. From there, click New Connected App on the top right. Can't find App Manager? Search for "Apps'' in the Quick Find box and select App Manager from the search results.

  • If you use Salesforce Classic, go to the Setup page, search for “Apps” in the Quick Find box, and select Apps from the Build | Create section. Under Connected Apps, click New.

  1. Enter the name for the new app: We recommend naming your new app something that is easy to recognise, like "Vonage AI Studio". When you've chosen a name, enter it into both the Connected App Name field and the API Name field.

  2. Enter your IT support email address: In the contact Email field, enter your chosen contact email address, such as the email address of your Salesforce administrator.

  3. Enter Callback URL: Under the API settings, check the Enable OAuth settings box and enter the following into the Callback URL text field:-

https://api-eu.vonage.com/oauth/redirect

Please note that using the right Callback URL dictates the amount of time your request will take to execute. Using the wrong URL will cause delays in authentication.

  1. Enable Full OAuth Access Settings: Under API (Enable OAuth Settings), check the box next to Enable OAuth Settings. When you do this, more fields and options will appear.

  • From the Available OAuth Scopes, select both Access and manage your data (api), Perform requests on your behalf at any time (refresh_token, offline_access) and Full access (full). Add these to your Selected OAuth Scopes by clicking the arrow button labelled Add.

  • Check the box next to Require Secret for Web Server Flow and Require Secret for Refresh Token flow.

  1. Save your app

  • Click Save at the bottom/top of the form.

  • You will then be prompted with the following message: "Changes can take up to 10 minutes to take effect. Deleting a parent org also deletes all connected apps with Outh settings enabled." Click Continue.

  • Next, under API settings, click on the button titled "Manage Consumer Details" next to Consumer Key and Secret.

  • The Consumer Key will be created. Make a note of it, as you'll need it in the next step of the setup. In AI Studio this will be required for the Client ID field.

  • The Consumer Secret is hidden behind a link. Click the link to reveal it and make a note of it, as you'll need it in the next step of the setup. In AI Studio this will be required for the Client secret field.

Once your connected app is created, you can go to the Edit Policies Section (by first clicking on Manage from the arrow dropdown next to your connected app from the App Manager page) and from there you can control the lifetime of your refresh and app tokens. The suggested option for Refresh Token Policies is "Refresh token is valid until revoked".

Under Oauth Policies, please make sure to change “IP relaxation” to “Relax IP Restriction”.

How to find your Consumer Key and Consumer Secret when using an existing connected app

If you use Salesforce Lightning Experience, go to the Setup page, then navigate to the App Manager. Select your relevant connected app from the existing apps list that you can see and go to Manage Consumer Details.

In certain cases where access tokens cannot be retrieved during the authentication process, resetting security token may help. In order to do this, visit your user settings, and click on the "Reset my Security token" under My Personal information under the quick find bar on the left. After you click on "Reset Security Token" and receive the token on your registered email, you will have to add in the token at the end of your original password. You can use this new password to login and pass authentication requests in the Salesforce nodes.

For further instructions to configure a connected app, see Create a Connected App in Salesforce Help. Specifically, follow the steps in Enable OAuth Settings for API Integration.

Last updated