+ Start a Discussion
Amy@29Amy@29 

OAUTH 2.0 Authentication

Hi ,

Is there any PDf that i can refer to , to create my webservice in salesforce.?

Also Im not able to setup my OAuth, when i go to Develop > Remote Access , it says "Remote access objects have been moved to applicaion.You'll be redirected to teh page in five seconds, or you can click Tke me there to go now".

Please Help.

Sonam_SFDCSonam_SFDC

Hey Amy,

Not exactly a PDF :) but the following online content should prove helpful in learning how to create your salesforce.com Web Service:
http://www.salesforce.com/docs/developer/cookbook/Content/api_setup_intro.htm

For the OAuth issue you are facing, Remote Access objects have been moved under Name | Setup | App setup | Create | Apps | Under connected apps | New so you can go to this location and proceed..

Hope the info helps!

SF-NewBieSF-NewBie

Hi Sonam,

 

Previously in Remote Access object, I can enter Callback URL and get Client ID and Consumer Secret key once the app is created. But in the newer option under Name | Setup | App setup | Create | Apps | Under connected apps | New, there is no such thing, can you please throw some light on it?? 

 

Example of older Remote Access screen can be seen in this page - http://wiki.developerforce.com/page/Getting_Started_with_the_Force.com_REST_API#Web_Service_Authorization_with_OAuth

 

Any help would be much appreciated. 

Sonam_SFDCSonam_SFDC

Hi,

 

If you try to add a  new Connected App from Name | Setup | App setup | Create | Apps | Under connected apps | New..you will see an OAuth Setting Section where you can put in your Callback URL and once you save the Connected App you will see the Client ID and Consumer Secret key.

 

Screen shot for reference:

http://tinypic.com/r/2ywsruv/5

 

Hope this helps!

 

SF-NewBieSF-NewBie

Thanks Sonam_SDFC, that solved the problem of Authentication. But I am running into one more problem related to Auth. I am using REST API as per instr given at http://www.salesforce.com/us/developer/docs/api_rest/index_Left.htm#StartTopic=Content/quickstart.htm

 

I am able to do everything for the Account object as listed in there but when I try to access access LoginHistory object, it throws up an error that the resource does not exsist. I have given FULL scope for the connected app I created.

 

The command I am using is  curl https://na15.salesforce.com/services/data/v20.0/sobjects/LoginHistory -H 'Authorization: Bearer access_token' -H "X-PrettyPrint:1" with access_token replaced with the my own access_token/session id. I am getting the following response, 

 

{
"message" : "The requested resource does not exist",
"errorCode" : "NOT_FOUND"
}

 

Any input?

Mohith Kumar ShrivastavaMohith Kumar Shrivastava

In version 20 the API call was not supported and hence the error.

 

Chnage the version to 28.0 and that should solve your issue .

 

The version will be 28.0 for login history .

 

https://na15.salesforce.com/services/data/v28.0/sobjects/LoginHistory