As far as I undestand, when I try to use Lightning Session Id, I receive an error

This session is not valid for use with the REST API

I have read in other topics that Lightning Session Id has limited access to API.

Is there any way to get full API-access Session Id from Lightning Application to get access to Tooling API or REST API or SOAP API or Metadata API?

Or is there any other direct way to get id of custom object field inside of Lightning Application?


Please see this post: How to call a Salesforce REST URL from Lightning Component?

Currently, the only solution is to put the session ID in VF and getContent on that. This session ID is different than the lightning session ID. I recommend reading the entire thread for understanding where this is currently at.

  • Yes, I have read that question but somehow missed that answer. Probably because that answer was not selected as accepted and not upvoted much – Patlatus Dec 13 '16 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.