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
mikegraftonmikegrafton 

Remote Access Application / OAuth

I'm trying to set up a remote access application so I can use OAuth and then the API from my application. I set up a brand-new developer account today and followed the instructions here:

 

https://na7.salesforce.com/help/doc/user_ed.jsp?section=help&target=remoteaccess_authenticate.htm&loc=help&hash=access_data

 

I'm using an OAuth library in Ruby (the 'oauth' gem).

 

So far, I've been able to succesfully retrieve a request token, and when I use that token I can authenticate with salesforce using the login URL metnioned. However, after succesful login my browser gets redirected to an error page (it looks like a few redirects happen, but I can't tell exactly). Finally I get an error message that says "Remote Access Authorization Error" and then "There was a problem setting up your remote access". The URL in the browser looks like this:

 

https://na7.salesforce.com/setup/secur/RemoteAccessErrorPage.apexp?oauth_error_code=1800

 

This error code, alas, is not listed amongst those in the documentation.

 

This happens whether I go through the login step as my developer user, or as a friend's user on an Enterprise account.

 

Any ideas about what's going on here?

 

I can't seem to get past this problem.  Any ideas?

 

Thanks,

Mike

willywuwillywu
are you making the request for a request token via query string params, post params, or an auth header?  is the result the same with all 3 methods?
mikegraftonmikegrafton

I was using auth header to get the request token; I switched to post params and voilá, it worked! Thanks for the hint.

 

How frustrating that I was doing something wrong when asking for a request token, yet Salesforce replied with a token anyway. I (wrongly) assumed that once I had a request token in hand, I had cleared that step. This is a bug on their end that will waste lots of people's time. It would be nice if SF acknowledged this and took steps to fix it - though AFAICT they have no issue tracker :(

 

Mike

Anand@SAASAnand@SAAS
I'm playing around with the OAuth feature and what I'm having a tough time understand how to construct the URL if I'm using Get. I've figured out most of the parameters except the oauth_signature. There's also the oauth_token and oauth_secret that I don't understand. 
betterbhushanbetterbhushan

could you paste sample of your code it will be helpful because even I am facing same problem.

Bruce_DoBruce_Do
please help post your solution, I'm facing with this issue for a month and don't kown how to fix