Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

How to automate the rotation of an API Key

DanC87764200407
Tera Guru

Does anyone know how to automate the rotation of API Key used for credentials?

1 ACCEPTED SOLUTION

Apologies for not reading correctly,
If there is no OOB functionality to auto update your sys_alias record, then you should be able to use Glide.

If the key is renewed within a token renewal payload?
I would think it possible to use 'OAuthUtil' script extension to manage population of your updated key via 'postprocessAccessToken'

View solution in original post

7 REPLIES 7

Oh okay, you are referring to OAuth 2.0, I'm referring to API Key credentials.

Apologies for not reading correctly,
If there is no OOB functionality to auto update your sys_alias record, then you should be able to use Glide.

If the key is renewed within a token renewal payload?
I would think it possible to use 'OAuthUtil' script extension to manage population of your updated key via 'postprocessAccessToken'

Thanks, probably will switch it from API Key to OAuth.