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
InteractiveLogicInteractiveLogic 

Apex REST API Authentication

Is oAuth the only means of authenticating to access Apex REST API methods? Is there a way, as in the SOAP API, to provide a user name and password, receive a session ID back and then use that to make susequent calls?

 

It looks to me from the docs and presentations I've read and seen that oAuth is the only official mechanism, but I hope it's not...

 

Thanks!

 

Best Answer chosen by Admin (Salesforce Developers) 
Scott_VSScott_VS

You can obtain an OAuth token if you supply the username / password, although it's not recomended:

 

https://na12.salesforce.com/help/doc/en/remoteaccess_oauth_username_password_flow.htm

All Answers

Scott_VSScott_VS

You can obtain an OAuth token if you supply the username / password, although it's not recomended:

 

https://na12.salesforce.com/help/doc/en/remoteaccess_oauth_username_password_flow.htm

This was selected as the best answer
InteractiveLogicInteractiveLogic

OK well it's good to know that it's possible.

 

I understand the reasoning behind it too, but we may have a special case in which it's necessary.

 

Thanks for the information. Much appreciated!