APIs & Integrations

JZhao
Participant

Does oauth key expire immediately?

SOLVE

I have setup oauth authentication based on this doc:

https://developers.hubspot.com/docs/api/working-with-oauth

 

The oauth key expires in 6 hours maximum. If I rotate a new key before that, will the old key becomes invalid immediately? Or is the old key still valid until 6 hours. Does this mean there will be multiple valid key in a certain time?

0 Upvotes
1 Accepted solution
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Does oauth key expire immediately?

SOLVE

Hi @JZhao ,

 

The API limits apply to all tokens per install, so no, not each OAuth token has its own limits but each app install. All tokens together share the same API limits.



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

View solution in original post

5 Replies 5
Teun
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Does oauth key expire immediately?

SOLVE

Hi @JZhao ,


Like I commented in your other post, the API limits for OAuth apply per app per portal. So one install of your app has the 100/10 burst limit. A second install in a different portal will have a new burst limit of 100/10.



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

Does oauth key expire immediately?

SOLVE

Hi @Teun ,

 

Thanks for your reply. What I mean is the same install. Like you said, there could be multiple valid oauth tokens if I refresh before the old one expires. Is each oauth token using its own limit? or are all these tokens sharing the same api limit?

0 Upvotes
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Does oauth key expire immediately?

SOLVE

Hi @JZhao ,

 

The API limits apply to all tokens per install, so no, not each OAuth token has its own limits but each app install. All tokens together share the same API limits.



Did my answer solve your issue? Help the community by marking it as the solution.
Teun
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Does oauth key expire immediately?

SOLVE

Hi @JZhao ,

 

Yes, an access token will stay valid until it has expired, so if you refresh the access token before the old one has expired, you could have multiple tokens.



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

Does oauth key expire immediately?

SOLVE

Thanks for your reply. If there are multiple valid token, how does API limit apply? Does each token have separate API limit?

0 Upvotes