APIs & Integrations

avyer
Participante | Partner nivel Platinum
Participante | Partner nivel Platinum

Missing or Unknown Hub ID

resolver

Just wanted to clarify what is the cause of this error:


"status": "BAD_HUB",
"message": "missing or unknown hub id"

 

Deleted hubspot and expired test portals doesnt seemed to produce the same error

 

Thanks!

 

 

1 Soluciones aceptada
WendyGoh
Solución
HubSpot Employee
HubSpot Employee

Missing or Unknown Hub ID

resolver

Hey @avyer,

 

Based on this forum post, it looks like expired test portal may cause this error. However, in order for me to further dig into this, could you share with me the following:

 

1. The exact endpoint you are using

2. Are you using hapikey/OAuth? 

3. The portal ID in question that you're sending the request to

Ver la solución en mensaje original publicado

0 Me gusta
11 Respuestas 11
WendyGoh
Solución
HubSpot Employee
HubSpot Employee

Missing or Unknown Hub ID

resolver

Hey @avyer,

 

Based on this forum post, it looks like expired test portal may cause this error. However, in order for me to further dig into this, could you share with me the following:

 

1. The exact endpoint you are using

2. Are you using hapikey/OAuth? 

3. The portal ID in question that you're sending the request to

0 Me gusta
annapurna
Participante

Missing or Unknown Hub ID

resolver

Hi @WendyGoh 

Is the error returned only when a portal is deleted? Are there any other situations when this error is returned?

 

I am able to reproduce after deleting a portal and requesting to refresh token as below

 

REQUEST

curl --location --request POST 'https://api.hubapi.com/oauth/v1/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=refresh_token' \
--data-urlencode 'client_id={client_id}' \
--data-urlencode 'client_secret={client_secret}' \
--data-urlencode 'refresh_token={refresh_token}'

 

RESPONSE:

{
    "status": "BAD_HUB",
    "message": "missing or unknown hub id",
    "correlationId": "{correlationId}"
}

 

0 Me gusta
WendyGoh
HubSpot Employee
HubSpot Employee

Missing or Unknown Hub ID

resolver

Hey @annapurna,

 

This error is likely because the app that we are attempting to install the app is deleted/it's an unknown portal ID. 

 

In this case, since your team deleted the portal, it is likely that that was causing the error.

0 Me gusta
annapurna
Participante

Missing or Unknown Hub ID

resolver

Hi @WendyGoh 

 

Thank you for your answer. Can you please confirm that the deleted portal is the only reason that causes this error? 

 

Does that mean that the user won't have access to the portal ever again? 

0 Me gusta
WendyGoh
HubSpot Employee
HubSpot Employee

Missing or Unknown Hub ID

resolver

Hey @annapurna,

 

In order to answer your first question, I'll have to check in with our internal team to ensure that I'm not missing any use case that may cause the bad hub error.

 

If that's the only cause of it, it would be a yes for the second question.

0 Me gusta
annapurna
Participante

Missing or Unknown Hub ID

resolver

Hi @WendyGoh 

Did you have the chance to talk with your internal team about cases when BAD_HUB error occurs?

0 Me gusta
WendyGoh
HubSpot Employee
HubSpot Employee

Missing or Unknown Hub ID

resolver

Hey @annapurna,

 

Here's an update from our internal team!

 

While we ain't able to provide a 100% confirmation on all the cases that may cause the `BAD HUB` error, for the most part: 

 

That error could be thrown in a situation where the Hub ID provided is invalid for use in that request for some reason, such as being inactive/deleted Hub, missing hubId param, conflicting auth information, etc. Making sure that the hub in the request is valid and active is a good start. 

 

Having said that, if you're seeing this error in which you're certain that the Hub exists, we'd be happy to look into it. Otherwise, this should only pop up when the Hub ID doesn't exist. 

annapurna
Participante

Missing or Unknown Hub ID

resolver

Hi @WendyGoh ,

 

Thank you so much for the last answer. It clears a lot of things. Is there a way to know if a hub exists or not using API?

WendyGoh
HubSpot Employee
HubSpot Employee

Missing or Unknown Hub ID

resolver

Hey @annapurna,

 

Currently, there isn't an API to check if a portal ID exists/is invalid. 

 

The best way to check is probably by attempting to see if you can login to the portal (assuming you're a user of the HubSpot portal). 

annapurna
Participante

Missing or Unknown Hub ID

resolver

We have some requests returning this error. Sent you PM for details.

0 Me gusta
avyer
Participante | Partner nivel Platinum
Participante | Partner nivel Platinum

Missing or Unknown Hub ID

resolver

Hi @WendyGoh,

 

As I've tested agian today it finally produced the BAD_HUB status, it turns out a freshly deleted portal produced BAD_SCOPE at first which sparked the confusion, this clarifies my issue.

 

Thank you!