-
Using SOQL queries in REST API request - Salesforce
Hi everybody,
I am trying to fetch Accounts from another salesforce org by using a httprequest instance. I have obtained the security token from the other org , my code extract for the query is as follows:
{httprequest req = new httprequest();
http testHttp = new http();req.setMethod('GET');
req.setEndPoint('https://ap2.salesforce.com/services/data/v38.0/query/?q=SELECT id,Name FROM Account');
req.setHeader('Authorization','OAuth *Here is the token*');
HttpResponse res = testHttp.send(req); }But it is giving me Error Code: 400
Any suggestions?? Thanks
Log In to reply.
Popular Salesforce Blogs
Encrypt Sensitive Data in Salesforce and Comply with Security Regulations
A Multitude of Data Regulations Nowadays, data storage and processing are heavily regulated by numerous protection laws, and businesses dealing with sensitive information are forced…
All About Record Locking in Salesforce
In this blog entry, I'd examine the various approaches to secure a Salesforce record UI. By lock, I mean, the client shouldn't have the option…
How to build a Revenue Funnel in Salesforce?
You might be here after reading the word "Revenue Funnel." Yes, Money matters, and that's why building a robust revenue funnel in Salesforce is essential.…
Popular Salesforce Videos
Salesforce Visualforce and Force.com Development Tutorial || Beginner
Learn to set up a web page using force.com and create forms for users to input information into Salesforce. For more Salesforce tips and tricks…
Salesforce is planning a blockchain product?
Salesforce is planning a blockchain product. That news alone would usually coincide with positive market moves, but in a diluted crypto market that isnt the…
Experience the Most Flexible, Easiest, and Securest Way to Integrate Salesforce and Jira
Integrate standard and custom Salesforce objects with Jira to strengthen cross-functional collaboration and deliver a top-notch customer experience. Fast-Track Your Journey to Attaining Customer Centricity…