APIs & Integrations

Eric_Byrd
Member

OAuth 2.0 testing code for generating tokens

2 Questions:

  • Per the create tokens documentation, Is there a “universal” test code (not an API key) that I can use to generate test access and refresh tokens? I have some automated unit tests that I’m trying to write.
  • Can I refresh the access token at any time during its lifetime? Your OAuth 1.0 documentation explicitly says that I can, but the 2.0 docs make no such claim.

Thanks!

1 Reply 1
Dadams
HubSpot Employee
HubSpot Employee

OAuth 2.0 testing code for generating tokens

Hi @Eric_Byrd

We don’t have a universal code that could be used for testing, and any codes you generate can only be used once.

Access tokens can be refreshed at any time, but we’d obviously recommend against refreshing the token before the existing token expires.

0 Upvotes