Error Reference

API key invalid or expired: request rejected

API key invalid or expired: request rejected

Where this appears

This error appears in ServiceNow system logs under System Diagnostics > Log > Application Log when external systems attempt to authenticate using REST API keys or OAuth. The error occurs during inbound web service calls, REST API requests, or third-party integrations when the provided API key cannot be validated against active records in the system.

Sourdough
Chrome Extension

Debugging this in a real instance?

Sourdough lets you trace "API key invalid or expired: request rejected" through system logs, script errors, and API health in the ServiceNow tab you are already using.

Add to Chrome

Free to install. Pro $5/month after a 14-day no-card trial.
Pro requires the ServiceNow admin role. Upgrade inside the extension.

Overview
Tasks
CMDB
API
Metrics
Monitor
Internals
Instance:sourdoughdev·Version:Yokohama
Instance StateONLINE
System StatusFully Operational
Session Timeout90 minutes
Logged-In Sessions2 (20 active)
Build Nameyokohama-12-18-2024_p1
IP Address10.159.128.43
Instance HealthHealth Score: 90%
🔥 5dSourdough (Chrome Plugin)Dark Mode

Cause

The API key has reached its expiration date and is no longer valid for authentication (high likelihood)

The API key record in the sys_api_key table has been deactivated or deleted by an administrator (high likelihood)

The external system is sending an incorrect or malformed API key value that doesn't match any records (medium likelihood)

The API key exists but lacks proper ACL permissions or role assignments for the requested resource (medium likelihood)

Network issues or encoding problems are corrupting the API key during transmission (low likelihood)

Fix

Step 1: Navigate to System Web Services > REST > API Key Management to view all API keys in your instance

Step 2: Search for the API key mentioned in the error by filtering the sys_api_key table or checking recent authentication logs

Step 3: Verify the API key's Active field is set to true and check the Expires field to ensure it hasn't passed the current date

Step 4: If the key is expired, either extend the expiration date or generate a new API key and update the external system configuration

Step 5: Check the User field on the API key record to ensure the associated user account is active and has necessary roles

Step 6: Review ACL rules for the specific REST endpoint being accessed to confirm the API key user has appropriate permissions

Step 7: Test the API key using a REST client like Postman to verify authentication works before updating the external integration

Step 8: Monitor System Diagnostics > Log > Application Log for successful authentication entries to confirm the issue is resolved

Test Your Knowledge

Quick 3-question quiz. See how your ServiceNow skills stack up.

Question 1 of 3Performance

A list view on a table with millions of records is slow. Best fix?

Select an answer to continue