• konigswagger
  • NEWBIE
  • 0 Points
  • Member since 2011

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

I am using OAuth and have been able to get a access_token (appended to the callback URL). Using the Force.com REST Toolkit, I can get the path to my attachment, such as /services/data/v21.0/sobjects/Attachments/someID/ and I make a URL as such:

 

https://cs3.salesforce.com/services/data/v21.0/sobjects/Contact/#id -H "Authorization: OAuth myToken"

 

I am getting an error message of [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]

 

Any suggestions? How should I go about entering the URL above (or any alternative URL that would work similarly) so that Salesforce acknowledges that I have already logged in once before?

 



I am using the Force.com-JavaScript-REST-Toolkit to access my data stored at Salesforce (using OAuth) in my Javascript applcation and was wondering how I would go about creating new records. I've seen many examples for creating SObjects and making the CREATE call in Java, but I am not sure how to do this in JS. Does anybody have a small snippet of code to show how to do this?

I am using OAuth and have been able to get a access_token (appended to the callback URL). Using the Force.com REST Toolkit, I can get the path to my attachment, such as /services/data/v21.0/sobjects/Attachments/someID/ and I make a URL as such:

 

https://cs3.salesforce.com/services/data/v21.0/sobjects/Contact/#id -H "Authorization: OAuth myToken"

 

I am getting an error message of [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]

 

Any suggestions? How should I go about entering the URL above (or any alternative URL that would work similarly) so that Salesforce acknowledges that I have already logged in once before?

 



I am using the Force.com-JavaScript-REST-Toolkit to access my data stored at Salesforce (using OAuth) in my Javascript applcation and was wondering how I would go about creating new records. I've seen many examples for creating SObjects and making the CREATE call in Java, but I am not sure how to do this in JS. Does anybody have a small snippet of code to show how to do this?