You need to sign in to do that
Don't have an account?
Tim S
error 400 using REST API
Hello,
I am using php cURL to access my Salesforce instance using the REST API. Without any change on my part, it stopped responding on 20th December and has not worked since then.
I have investigated and found that:
1. The authentication step is working (goes to https://login.salesforce.com)
2. All other requests to https://myinstance.salesforce.com/services...... fail with error 400
3. The same requests work in REST Explorer by simply copy/paste the request line
This behaviour looks like Salesforce is rejecting anything coming from my site through the API to myinstance.salesforce.com.
Did any change take place on or about 20th December in the way REST API is called?
If Salesforce has decided that my site or ISP is a bad risk, how can I have that addressed? I don't expect that it the case because the authentication works.
Merry Christmas to all.
Tim
I am using php cURL to access my Salesforce instance using the REST API. Without any change on my part, it stopped responding on 20th December and has not worked since then.
I have investigated and found that:
1. The authentication step is working (goes to https://login.salesforce.com)
2. All other requests to https://myinstance.salesforce.com/services...... fail with error 400
3. The same requests work in REST Explorer by simply copy/paste the request line
This behaviour looks like Salesforce is rejecting anything coming from my site through the API to myinstance.salesforce.com.
Did any change take place on or about 20th December in the way REST API is called?
If Salesforce has decided that my site or ISP is a bad risk, how can I have that addressed? I don't expect that it the case because the authentication works.
Merry Christmas to all.
Tim
there error is in your JSON or XML part
400 : The request couldn’t be understood, usually because the JSON or XML body contains an error.
if there is any date part in your JSON for request and response.
Check your data passing for your request and response.
hope this will help you.
Thanks
karthik
Check the http request header and body format with workbench row format before hitting callout so that you can find the difference in the JSON or XML format.
the 400 error comes only when the request is not in the expected format.
Regards,
GM
Hi Tim S,
I am facing the same issue.
Have you resolved it? If so, could you tell me what is the resolution?
The above-provided answers do not helping me. The code which is being worked from last 1 year has stopped working by throwing this Exception.