-
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
How To Plan For A Successful Salesforce Data Migration?
This blog on data migration planning features a brief into towards data migration planning process then it focuses on common data migration issues, the extension…
How Can Salesforce CRM Boost its Sales Revenue?
Salesforce is a CRM that puts sales at the center of its operation. Salesforce has the capacity to do it just right, from acquiring precise…
10 Warning Signs Your Salesforce Implementation Is Heading for Disaster
Salesforce is a powerful Customer Relationship Management (CRM) tool that helps businesses streamline operations, enhance customer interactions, and drive business growth. However, the journey from…
Popular Salesforce Videos
Why Sinergify is best-of-breed Salesforce-Jira Connector
Salesforce and Jira Integration have been simplified with Sinergify. The product allows for seamless integration between both instances and offers numerous benefits including effective collaboration…
How Admins Can Improve Salesforce Data Quality
Learn how to diagnose the accuracy of your data and build a plan to maintain and enhance its’ quality using Salesforce tools. Follow along to…
Wildcards in SOSL | Clauses in SOSL | Learn Salesforce Development
In this video, Shrey covered Wildcards in SOSL in Salesforce. And also you will learn: What are the different Wildcards in SOSL? What are Clauses…