function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MithunPMithunP 

How to access external API with Oauth

Hi All,

We are trying to get access token from external system. We have external system client id, client secret and endpoint url but not having username and password. Is it possible to get access token from external system using Oauth without UN and Password.

Thanks,
Mithun.
Himanshu ParasharHimanshu Parashar
Hi Mithun,

You need to check the external system API documenation as far as you have client secret and Client id there is no need to have username and password until and unless that service is expecting to pass username and password. For example if you will try to access facebook api then client id and client secret is enough to make call out.

Does it makes sense?

Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
Nishant SharmaNishant Sharma
In any case, you will require Username and password. You can not authenticate user without credentials. Even facebook redirects you to login page during authentication. Client id and client secret is just for app you have created. As per general architecture, you authorize yourself against the app (client id and secret).