APIs & Integrations

TbotTest
Participant

ERROR 503 - Error with API connection

SOLVE

Hello everyone! I'm having a problem with the HubSpot API as of today, as it won't allow me to link my HubSpot account to my app and it keeps loading without giving a response. It seems that the problem is in the function api_client.auth.oauth.tokens_api.create_token(), because I receive the code in the URL but when it has to create the token it never creates it and throws an 'EXPIRED_AUTH_CODE' error. I have not made any changes to the code and yesterday everything worked perfectly. I have checked that the HubSpot servers are up and running and they are. Any help or someone who is experiencing the same?

0 Upvotes
1 Accepted solution
TbotTest
Solution
Participant

ERROR 503 - Error with API connection

SOLVE

Hi @Jaycee_Lewis! Thanks for your help. I just fixed it a few days ago, sorry for not closing this report in the first instance. In case this helps anyone, my error was because my internet service provider changed some settings and they never told me about it. Testing, I found that HubSpot was sending me the code correctly when I tried to connect an account with my app, but I was getting a 503 request response. Then I found that packages like wget or package installers like pip (Python) had the same issues. In the case of the curl command, I detected that it was trying to use the IPv6 route and then changed to IPv4 (I think because it failed or something), but in the case of wget it didn't change and directly failed. Same with pip, it took minutes to try to connect with PyPI (pypi.org).

So, I imagine that the same thing happened with HubSpot: it took time to generate the token and once it was generated, its use time had already expired.
Lastly, I forced my internet to run on IPv4 until they fix it and then everything worked fine.

 

Hope this helps someone!
Greetings and thanks again

View solution in original post

3 Replies 3
Jaycee_Lewis
Community Manager
Community Manager

ERROR 503 - Error with API connection

SOLVE

Hi, @TbotTest 👋 Thanks for your question. Let's see if we can get this conversation started for you — @taran42 @MichaelC @JBeatty, have you run into this error?

 

Thank you very much! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

TbotTest
Solution
Participant

ERROR 503 - Error with API connection

SOLVE

Hi @Jaycee_Lewis! Thanks for your help. I just fixed it a few days ago, sorry for not closing this report in the first instance. In case this helps anyone, my error was because my internet service provider changed some settings and they never told me about it. Testing, I found that HubSpot was sending me the code correctly when I tried to connect an account with my app, but I was getting a 503 request response. Then I found that packages like wget or package installers like pip (Python) had the same issues. In the case of the curl command, I detected that it was trying to use the IPv6 route and then changed to IPv4 (I think because it failed or something), but in the case of wget it didn't change and directly failed. Same with pip, it took minutes to try to connect with PyPI (pypi.org).

So, I imagine that the same thing happened with HubSpot: it took time to generate the token and once it was generated, its use time had already expired.
Lastly, I forced my internet to run on IPv4 until they fix it and then everything worked fine.

 

Hope this helps someone!
Greetings and thanks again

Jaycee_Lewis
Community Manager
Community Manager

ERROR 503 - Error with API connection

SOLVE

Hey, @TbotTest 👋 Thank you very much for adding what worked for you 🙌 — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes