• Agraj
  • NEWBIE
  • 50 Points
  • Member since 2012

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 7
    Replies

Hi,

 

I've implemented Salesforce OAuth 2.0 Web Server flow and it works perfectly well with a HTTP callback uri. But when I use an HTTPS callback URI, the page on which the User Approves the app to use Salesforce asks for less permissions than what is shown for HTTP URI. 

 

The Remote Access Applications setup for both is exactly the same except the callback uri's ( obviously )

 

The page requesting the user to grant access for HTTP callback uri is asking for 3 permissions ( see https://www.dropbox.com/s/62qzsgev3nidw9o/developersalesforce.tiff

1. Access your basic information

2. Access and manage your data

3. Perform requests on your behalf at any time

 

While the same page for HTTPS callback uri is only asking the first two options and not the third one ( see https://www.dropbox.com/s/w0k92iu42wuudug/securesalesforce.tiff )

 

Because of this, I cannot refresh my access tokens and the request to refresh access token fails.

 

Any insights on this will be highly appreciated.

 

Regards,

Agraj

Hello all,

 

I'm trying to create a lead using the Force.com REST API and able to do so successfully.

 

Now, I go ahead and delete that lead from Salesforce. 

 

If I try to create the same lead again via API, then it gives the following error:

[{"fields":[],"message":"entity is deleted","errorCode":"ENTITY_IS_DELETED"}]

 

I also tried deleting the lead from Recycle Bin in Salesforce, but that didn't helped.

 

Please let me know what I'm doing wrong.

Hi,

 

I'm using OAuth2.0 User-Agent Authentication flow to get the access & refresh tokens so that I can use the REST API over remote access.
Now, the problem is that I'm able to authorize successfully and recieve the tokens, but while using those tokens, I'm recieving a java.net.ConnectException: Connection refused error.

 

Following Steps I'm doing

 

1. Redirecting to
https://login.salesforce.com/services/oauth2/authorize?response_type=token&client_id=......&redirect_uri=......&state=myState

 

2. Authorizing the app in salesforce and then receiving back the access token and refresh tokens in the hash of the redirect_uri as
http://localhost:4502/etc/cloudservices/salesforce/testing.html#access_token={my_access_token}&refresh_token={my_refresh_token}&instance_url=https%3A%2F%2Fap1.salesforce.com&id=https%3A%2F%2Flogin.salesforce.com%2Fid%2F00D90000000gscOEAQ%2F00590000000sdtJAAQ&issued_at=1351151192815&signature={my_signature_value}&state=myState
&scope=id+api+refresh_token

 

3. Now I'm using the REST API using the same access token by doing a POST to
https://ap1.salesforce.com/services/data/v20.0/sobjects/Lead/
with request headers
Content-Type: application/json
Authorization: OAuth {my_access_token}
I have not escaped the access token while sending the post as it needs to be done when using CURL. Is that needed when using HttpClient Java API also?

 

The response that I'm getting is "java.net.ConnectException: Connection refused error."

Can someone please let me know what I'm doing wrong or how I can debug it further ??

 

Thanks,
Agraj

PS: I'm getting the exact same error if I try OAuth Refresh Token Process also.