## TL;DR

Always use a dedicated service user with the minimum roles needed instead of an admin account. When a ServiceNow REST call fails, read the status code like this: 401 is credentials, 403 is missing roles (grant itil or the table read role), 404 is a malformed instance URL.

## Steps

1. When a ServiceNow REST call fails, read the status code like this: 401 is credentials, 403 is missing roles (grant itil or the table read role), 404 is a malformed instance URL. Always use a dedicated service user with the minimum roles needed instead of an admin account. And if the instance is unreachable at all, check whether the developer instance hibernated before debugging your code.

## When to use

You are seeing this: When a ServiceNow REST call fails, read the status code like this: 401 is credentials, 403 is missing roles (grant itil or the table read role), 404 is a malformed instance URL. Use this skill when you run into "ServiceNow REST 401 is credentials, 403 is missing roles, 404 is bad instance URL".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

## Edge cases

- Also, free developer instances hibernate after inactivity, so an unreachable instance may just need a wake from the developer portal.
