Solutions

API client HTTP 5xx errors

Likely cause

The API gateway might return HTTP 502 when there is misconfiguration or miscommunication between the Ping Identity gateway integration kit and the HTTP Access Policy Service in PingOne Authorize.

How to troubleshoot

The gateway integration kit logs warning messages to the API gateway error log when it encounters problems communicating with PingOne Authorize. For more information, see the integration kit documentation for your API gateway:

API client HTTP 404 errors

Likely cause

The API gateway might return HTTP 404 to API clients when PingOne cannot match an API client’s request to any of the Base URLs configured for an API service.

How to troubleshoot

PingOne Authorize produces events in your PingOne environment audit log to aid in troubleshooting HTTP 4xx errors. For more information, see Viewing API Access Management events in your PingOne environment audit log.

Details

The PingOne environment audit log will provide more detailed information. For example: No API server defines policy for the URL. The error message lists the URL sent by the API client to the API gateway. For example: https://localhost:8443/meme-game/api/v1/users/user.0/answers.

How to fix

Go to Authorization > API Services. Check the Base URL settings for the API service in question. If necessary, create an API service. Ensure that the Base URL for the API service matches the beginning of the URLs used by API clients when making requests for the API service through the API gateway.

API client HTTP 401 errors

Likely causes

The API gateway returns HTTP 401 to API clients when the API client’s request cannot be authenticated or doesn’t satisfy basic access control checks for an API service. For example, the API client attempts to invoke APIs in API service A using an OAuth Access Token issued for API service B. Or, the API client is using an old OAuth Access Token that has since expired.

How to troubleshoot

PingOne Authorize produces events in your PingOne Environment Audit Log to aid in troubleshooting HTTP 4xx errors. For more information, see Viewing API Access Management events in your PingOne environment audit log.

Details

The PingOne Environment Audit Log provides more detailed information. For example:

Request to the URL "https://example.com" denied due to an invalid OAuth access token.

The www-authenticate HTTP response header contains more information, such as Token expired or Invalid audience.

How to fix

Ensure that API clients properly manage their OAuth Access Tokens, including refreshing them or obtaining new tokens as necessary before tokens expire.

Other API client HTTP 4xx errors

Likely causes

The API gateway returns other HTTP 4xx errors to API clients when the API client’s request doesn’t satisfy access control rules configured for the API service or its API Operations in PingOne Authorize. For example, the API client attempts to invoke an API Operation that requires the user to be a member of a particular group in PingOne, but the user is not a member of that group.

How to troubleshoot

PingOne Authorize produces events in your PingOne Environment Audit Log in order to aid in troubleshooting HTTP 4xx errors. For more information, see Viewing API Access Management events in your PingOne environment audit log. You can trace recent authorization decisions in order to understand which access rules were not satisfied. For more information, see Viewing recent decisions for the API Access Management decision endpoint.

Details

The PingOne Environment Audit Log provides more detailed information. For example:

Request to the URL "https://example.com" denied by policy evaluation."

The Recent Decisions visualization contains more information, including which rule was not satisfied and which attribute values were compared during policy evaluation. For more information, see Examining recent decisions.

How to fix

Ensure that API Operation access rules are properly configured to meet your application requirements. For group-based access control, ensure that the user is a member of one of the required groups. Also, ensure that the API client has been delegated authorization by a user, such as obtaining an OAuth Access Token using OAuth Code Flow.