supriya hirurkar
Posts: 0
Joined: Fri Aug 30, 2013 8:57 pm

Trouble in Fetching accounts from salesforce

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.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Trouble in Fetching accounts from salesforce

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

supriya hirurkar
Posts: 0
Joined: Fri Aug 30, 2013 8:57 pm

Trouble in Fetching accounts from salesforce

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

Return to “Issues”