APIs & Integrations

KevinL33
Membro

Search for Companies by Domain returns Method Not Allowed

resolver

HI all, I'm trying to use the function Search For Companies by domain, documented here:

https://legacydocs.hubspot.com/docs/methods/companies/search_companies_by_domain

 

But I always receive:

HTTP Error 405 

Method Not Allowed.

 

Has the function been deprecated? If so is there a current replacement for it?

 

Kevin.

0 Avaliação positiva
1 Solução aceita
dennisedson
Solução
Gerente da Comunidade
Gerente da Comunidade

Search for Companies by Domain returns Method Not Allowed

resolver

ah, 

That would be expected then.

2 problems:

1.  you need to use your hapikey to get results specific for your portal

2.  the browser can only make get requests where this endpoint requires a post request. 

You can download postman or an equivalent to test this.


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.

Exibir solução no post original

0 Avaliação positiva
7 Respostas 7
KevinL33
Membro

Search for Companies by Domain returns Method Not Allowed

resolver

Hi @dennisedson I post the url from the demo, or I can put in one of our client contact domains with my apikey and get the same result

 

https://api.hubapi.com/companies/v2/domains/hubspot.com/companies?hapikey=demo


0 Avaliação positiva
KevinL33
Membro

Search for Companies by Domain returns Method Not Allowed

resolver

I should mention that I'm entering the url on a web browser and just viewing the Json that's returned ( if it's returned).

 

0 Avaliação positiva
dennisedson
Solução
Gerente da Comunidade
Gerente da Comunidade

Search for Companies by Domain returns Method Not Allowed

resolver

ah, 

That would be expected then.

2 problems:

1.  you need to use your hapikey to get results specific for your portal

2.  the browser can only make get requests where this endpoint requires a post request. 

You can download postman or an equivalent to test this.


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.

0 Avaliação positiva
KevinL33
Membro

Search for Companies by Domain returns Method Not Allowed

resolver

Thanks for the info @dennisedson .  I actually installed the c# package HubSpot.NET and used the functions api.Company.GetByDomain() and api.Company.GetById().  Both work like a charm. Thanks again.  KL.

KevinL33
Membro

Search for Companies by Domain returns Method Not Allowed

resolver

Hi @Teun   I am using an API key, the demo example doesn't even work.  If you follow my link and copy/paste the example URL you'll see the same error.

 

0 Avaliação positiva
dennisedson
Gerente da Comunidade
Gerente da Comunidade

Search for Companies by Domain returns Method Not Allowed

resolver

@KevinL33 ,

I just tested in postman and it works for me 🤔

Can you post exactly what you are sending? (minus your hapikey)


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.

0 Avaliação positiva
Teun
Especialista reconhecido(a) | Parceiro Elite
Especialista reconhecido(a) | Parceiro Elite

Search for Companies by Domain returns Method Not Allowed

resolver

Hi @KevinL33 ,

 

Do you use oAuth2 or the API key? If you use oAuth2, check if you have the correct scopes (contacts) in place. 



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.