Page 1 of 1

Trouble in Fetching accounts from salesforce

Posted: Wed Sep 04, 2013 8:47 pm
by supriya hirurkar

I successfully created a custom API to login into Salesforce, saved the access_token and instance_url locally. I am now using the saved access_token to fetch my accounts from the org. My request parameters are my query, Authorization(Header) and the instance_url. When I test the my request, I get an appropriate response of all the accounts as I expect. But when I do the data mapping and run the app, my accounts dont get fetched and I get this error on the console 'Failed to load resource: the server responded with a status of 401 (Unauthorized)'. I checked all my services and config settings and everything looks right. Please help me with this.


Trouble in Fetching accounts from salesforce

Posted: Wed Sep 04, 2013 8:53 pm
by maxkatz

For Authorization header, are you adding this to mapping:
code
return "Bearer " + value;
/code


Trouble in Fetching accounts from salesforce

Posted: Wed Sep 04, 2013 9:12 pm
by supriya hirurkar

Thanks Max. Got it working. I was using something like "OAuth" + value and that was the issue.