0

I am new to the SalesForce and trying to execute the below from the workbench the same I want to execute from the Mozilla REST client. What URL I should be using?

enter image description here

So What should I be used here ?

enter image description here

=========================

As per guidance from Dan, I am getting the required output:

enter image description here

1
  • 1
    Just add https://<instance>.salesforce.com before /services/....
    – Adrian Larson
    Apr 21, 2017 at 13:58

1 Answer 1

1

I believe from an outside system you will need to first get an auth token and then use that to call the service you are using. So below I have listed the steps you would need to use to get what you see.

Create a new Connected App enter image description here

From the Connected App get he Consumer Key and Consumer Secret

User the following format to get your auth token in POST request (User test or login based on sandbox or developer/production org:

https://"Login or test".salesforce.com/services/oauth2/token?client_id="Consumer-Key"&client_secret="Consumer-Secret"&username="UserName"&password="Password-SecurityToken"&grant_type=password

Get access_token from below response

{
      "access_token": "AccessTokenHere",
      "instance_url": "URL",
      "id": "Id",
      "token_type": "Type",
      "issued_at": "Issued",
      "signature": "Signature"
    }

Send GET request with new access token as header in following format: Authorization: Bearer access-token

I hope this helps.

2
  • You're right. It make sense what you're saying. Without getting access_token, I am getting "message": "Session expired or invalid", "errorCode": "INVALID_SESSION_ID". I will try to get the access_token and will let you know if it works.. Apr 21, 2017 at 17:17
  • I created separate issue. Could you please guide :: salesforce.stackexchange.com/questions/171066/… ? Apr 21, 2017 at 17:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .