Error accessing /properties/v1/contacts/properties via OAuth1

oauth

#1

Hi All

We’ve built and integration between HubSpot and our system on top of HubSpot API. From last Friday we are experiencing errors when accessing GET /properties/v1/contacts/properties endpoint via OAuth1. The error is:

401 Multiple authentication targets presented for access_token!

Other endpoints we use i.e /contacts/v1/lists/all/contacts/all works fine. I know that OAuth1 is deprecated, but from what I found on the forum it should still work for older apps, like ours. We would like to migrate to OAuth2 in a long term, but this is not a seamless process because we have already many customers using the integration.

Any advice ?

Thanks in advance
Tomek


#2

Hi @tomek_r

Are you including both the access_token= query parameter and the Authorization: Bearer header in the request? And if so, are you also including the token in both as well?


#3

Hi @dadams

Yes this was the case, we had a bug in our OAuth client implementation and we used both authentication methods by mistake.

Thanks for your help!


#4

We’re seeing this intermittently as well. I can actually say that we actually ARE sending both the Auth header AND the access_token URL param for ALL of the endpoints we’re accessing from HubSpot (this is a legacy code base, not my implementation! :stuck_out_tongue: )

It’s interesting that

  1. this is only happened recently and
  2. only for a very specific resource, /analytics/v2/sources/${params.source}/d?portalId=${params.portalId}&access_token=${params.access_token}

Are we safe to remove all instances of the access token URL param?


#5

So actually, removing the access_token URL param did not fix this. Now I’m seeing back 400 - Access token requires expiresAt.

Is this a bug in the HubSpot API? Maybe it’s related to the deprecation of oauth1 and the non-public /analytics resource?


#6

Is there anyway for HubSpot developers to be notified of changes to the API?

It seems HubSpot’s policy is “move fast and break things” like Facebook, but since ours isn’t we spend a lot of overhead fixing issues that arise from breaking changes made to the HubSpot API like this one which occurred abruptly on the 20th.


#7

I am also facing the same issue with few auth1 tokens.

400 - Access token requires expiresAt.