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
KumarhattiKumarhatti 

OAUTH 2.0 Authentication - how to authenticate programmatically

I have quite a situation with using OAuth 2.0 for authentication in the integration I am trying to implement.

I am using REST architecture to expose API of my webservice, so Biztalk can post the xml to SFDC. However, I have two options for authenticating external server,

1)      SESSION ID

2)      OAuth 2.0

 

As far as my understanding, OAuth 2.0 in conjunction with REST architecture can only be implemented via user interface, meaning when external server attempts to communicate with SF, they have to

enter credentials using UI, but I want to authenticate the server call programmatically? can it be done?? . If this is the case – that is, if REST is not designed to authenticate external calls via programmatically, then the only choice I have is using session ID, is that correct?? Because, I went through REST documentation, lots of demos, use cases and conversation in forums, all points to the same thing.

 

If I am wrong, it would be great if you can provide some implemented use case as an example or snippet of code, how this is done. Please let me know if you have any questions.

Thanks a lot.

Best Answer chosen by Admin (Salesforce Developers) 

All Answers

sekharasekhara

Hi

Can u please share OAUTH 2.0 Authentication Code Snippet.

 

Thanks In advance.