Expand my Community achievements bar.

SOLVED

Oauth key expiry

Avatar

Level 3

Hi,

We are looking to integrate with a 3rd party by leveraging one of the api.  However, it seems the Oauth key has a very short expire window.  How do we work around as we don't want to go in and update the key everyday?  Any help is appreciated.

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hey @CBSIMP 

 

I am sure you already know, the refresh of a token is a security feature which is meant to keep your connections safe, so with a production setup, it is always better to have the token generated within a timeframe.

 

Also, when you mention, you don't want to go in and update, how are you generating the token? Reason for asking this is that tokens can be generated programatically just before making the api call and can then be plugged into the api call headers. My suggestion would be to try and generate it in the script/code before making the api call instead of trying to circumvent the expiry. This way you won't have to do it manually.

 

Cheers,

Abhinav

View solution in original post

2 Replies

Avatar

Employee

It depends on the API which you are looking to use.

 

Query service does have a non-expiring Service Account, but all other end points have an beaer token which need to be refreshed.

Avatar

Correct answer by
Community Advisor

Hey @CBSIMP 

 

I am sure you already know, the refresh of a token is a security feature which is meant to keep your connections safe, so with a production setup, it is always better to have the token generated within a timeframe.

 

Also, when you mention, you don't want to go in and update, how are you generating the token? Reason for asking this is that tokens can be generated programatically just before making the api call and can then be plugged into the api call headers. My suggestion would be to try and generate it in the script/code before making the api call instead of trying to circumvent the expiry. This way you won't have to do it manually.

 

Cheers,

Abhinav