Can we fetch and use API key from api_key_credentials table in a server-side script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi All,
I have a use case where the API key is stored in the api_key_credentials table. I want to use this API key directly in my server-side script, but I’m getting errors.
Is there any way to use this key securely in my script while maintaining API privacy?
If yes, what would be the recommended approach?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
yes, you can use it securely, but don’t fetch and expose it in plain text. Stick with Credential records + Connection & Credential aliases or the sn_cc API — that’s the ServiceNow-recommended approach and also keeps you audit/compliance-safe.
Kind Regards,
Mohamed Azarudeen Z
Developer @ KPMG
Microsoft MVP (AI Services), India
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Create new API Key Credential from Connections & Credentials -> Credentials and use it from your flow action.
Refer below post for setting up API Key Credentials,
If this helped to answer your query, please accept the solution and close the thread.
Thanks,
Bhuvan