0

I'm sure it's a minor thing I miss over here, but I'm trying to solve it for like 2 hours without luck.

I'm trying to access the bulk API.

When I'm doing it with workbench its works fine :

/services/async/50.0/job

But when I try to do it from postman, Its throw me a status of : 400 no host. with the next body :

<h1>Bad Message 400</h1>
<pre>reason: No Host</pre>

I believe it's because of the instance URL but I cant find what I'm doing wrong.

This is the requested URL:

https://instance.my.salesforce.com/services/async/50.0/job

I also tried the request URL from the docs :

https://instance_name—api.salesforce.com/services/async/APIversion/job

But when I'm adding the "-api" to the instance name - I'm getting the error from postman :

 Error: getaddrinfo ENOTFOUND instance-api.my.salesforce.com

I put al the requested headers and body :

Headers :

Content-Type - application/json

Accept - application/json

X-SFDC-Session - access token

body :

{"operation":"upsert","object":"Account","contentType":"JSON","externalIdFieldName":"externalField__c"}

BTW -

I saw this question: Getting Bulk API details from my.salesforce.com organization

and I made sure I'm on the right URL - when getting the access token from salesforce (I looked o the returned instance_url )

many thanks,

1 Answer 1

1

I accidentally unchecked some headers that Postman inserted automatically:

Content-Length : <calculated when request is sent>

Host: <calculated when request is sent>

When I checked them its worked.

Thanks.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .