• tjn11
  • NEWBIE
  • 0 Points
  • Member since 2012

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

I am using the refresh token flow to obtain an access token to use in REST API calls. Im succesfully getting an access token back in the response from my refresh token flow call. The problem is that performing a simple query like "select name from user" with the RESP API and the access token returned from the refresh token flow gives me the following error.

 

The remote server returned an error: (500) Internal Server Error.

An unexpected error occurred. Please include this ErrorId if you contact support: 2141401881-27724 (-1063440253)

errorCode:UNKNOWN_EXCEPTION

 

I can get an access token using the username-password flow and make the same query no problem.

 

In either case, im putting the following in the header of query call

 

"Authorization: OAuth " + AccessToken

 

do I need to put something different when my access token was obtained via a refresh token flow?

 

 

  • July 01, 2013
  • Like
  • 0

I currently have a c# app that logs into salesforce via a POST webrequest with the following url

 

https://login.salesforce.com/services/oauth2/token?grant_type=password + clientid + clientsecret + username + password

 

I get the instance url and access_token from the response then use these to make another webrequest to a APEX REST API service that I wrote. all that is working great.

 

My question is: when i'm done doing the above, should I be performing some type of logout? if so, I can't find what to do.

 

Thanks!

 

 

 

 

 

 

 

  • October 18, 2012
  • Like
  • 0

I'm new to SFDC Development and Cloud Development in general. Could someone please point me to a simple example of a vs2010 c# console app that authenticates to my SFDC Developer account, then uses the Force.com REST API to query some data from one of my custom objects. I'm not a JAVA guy. Finding this type of an example has been difficult. I've created both a User Token and a Remote Access entry in my SFDC developer account. What do I need to install on my machine to be able to access SFDC from vs2010 projects. In one of the c# examples i've found, the project had a WEB REFERENCE to apex and apex metadata. Under the .NET 4 Framework, I don't even have an option to add a WEB REFERENCE. I noticed if I change my project settings to .NET 2.0, I do have the option of adding a WEB REFERENCE. So, in VS2010, C#, how do I get what I need for developement/connectivity to salesforce. Thanks!

  • September 07, 2012
  • Like
  • 0

I am using the refresh token flow to obtain an access token to use in REST API calls. Im succesfully getting an access token back in the response from my refresh token flow call. The problem is that performing a simple query like "select name from user" with the RESP API and the access token returned from the refresh token flow gives me the following error.

 

The remote server returned an error: (500) Internal Server Error.

An unexpected error occurred. Please include this ErrorId if you contact support: 2141401881-27724 (-1063440253)

errorCode:UNKNOWN_EXCEPTION

 

I can get an access token using the username-password flow and make the same query no problem.

 

In either case, im putting the following in the header of query call

 

"Authorization: OAuth " + AccessToken

 

do I need to put something different when my access token was obtained via a refresh token flow?

 

 

  • July 01, 2013
  • Like
  • 0