HTTP Apollo API call not working - what am i doing wrong?

I am trying to ping the Apollo API, with the following C-url form their documentation:

curl --request POST
–url ‘https://api.apollo.io/api/v1/mixed_people/search?person_titles[]=seo%3B%20marketing&q_organization_domains_list[]=betclic.fr’
–header ‘Cache-Control: no-cache’
–header ‘Content-Type: application/json’
–header ‘accept: application/json’
–header ‘x-api-key: KEY’

I have tried using both the “HTTP Make a request” & “Apollo Make an API call”
But HTTP runs, but dosent return any info, while the Apollo API call isn’t wokring.

How to fix?

1 Like

Hi Christopher,

curl is used by developers to test APIs in terminals of their corresponding application. The reason why Make comes in handy, is because you don’t have to do all this; the HTTP module replaces this!

Let’s use the HTTP module.

Also, if your header is Content-Type: application/json, Apollo expects the call to be in JSON format too.

Use the following headers:
x-api-key: KEY
content-type: application/json
cache-control: no-cache

Depending on which request you can to make (what you want to achieve with the API call), you should use any URL listed in the Apollo documentation. For example this one (POST): https://api.apollo.io/api/v1/people/match

Choose application to be in JSON format (you can do this in your HTTP module using the dropdown), and I believe you don’t even need this header than anymore in your HTTP module.

Your setup should be something like this:

If you have any questions left regarding the JSON format, you can ask them! - Hope this helps

THANKS for helping out!

I just tried to do the following.
And it runs. BUt does not return anything.

Can u see why?

But it does not retunr ANYTHING in the people.

Hi Christopher,

You need to paste the value of your Apollo API key in the ‘Value’-field in x-api-key. So replace KEY with your unique API key, and don’t share it with others.

Since your HTTP module runs, it means that the request would likely be valid if your api key is connected (the url together with the method is probably right)

If you only need to GET information from Apollo, make sure to change POST method to GET

3 Likes

It worked! Thank you so much.

2 Likes