Question:
How to obtain a Consumer Key and Secret of the Connected App?
Answer:
For an existing Connected App, do the following:
- Navigate to Setup --> Create --> Apps.
- Click on the app that is needed.
The loaded page contains this information under API (Enable OAuth Settings).
Create a new Connected App:
- From Setup, navigate to Create --> Apps.
- Click New to define a Connected app.
- Enter the name of the application.
- Enter the contact email information as well as any other information appropriate for the application.
- Select Enable OAuth Settings.
- Enter a Callback URL. Depending on which OAuth flow is used, this is typically the URL that a user’s browser redirects to after successful authentication. As this URL is used for some OAuth flows to pass an access token, the URL must use secure HTTP (HTTPS) or a custom URI scheme.
- Add all supported OAuth scopes to Selected OAuth Scopes. These scopes refer to permissions given by the user running the connected app.
- Enter a URL for Info URL. This is where the user can go for more information regarding the application.
- Click Save.
The Consumer Key is created and displayed, and the Consumer Secret is created (click the link to reveal it).
Once a connected app is defined, use the consumer key and consumer secret to authenticate the application.
Related Documentation:
Salesforce Documentation: Connected App using OAuth needs Client ID and Client Secret to Authenticate
Send us your feedback: We are always looking for feedback to help improve our Knowledge Base! Please let us know if this article is helpful or provide feedback on how we can improve your experience by clicking here.