Test API key appears to be invalid

At the top of this page, you can get a test API token: https://developer.pagerduty.com/api-reference/

(starts with y_, then a lot of characters)

When I try to test this with the PagerDuty API Incidents/Create an incident POST in Postman (downloaded from your site), I get an error:

{"error":{"message":"Access Denied","code":2010}}

The test token was placed in the Authorization field.

I get the same trying to hit the REST API directly from code, trying to POST a request like this:

{
  "routing_key": "(test token from top of API reference site, begins with y_)",
  "event_action": "trigger",
  "payload": {
    "summary": "Critical Event (Test)",
    "source": "some source",
    "severity": "critical",
    "custom_details": {
      "errors": {
        "oh darn": "the other thing did not work"
      }
    }
  },
  "dedup_key": "md5-2f95015af22bc6823ee066030c13a6ab"
}

How would I test this? Is there a place where I can get a v2 API test key that works?

We don’t allow any POSTS/PUTS/DELETES into this developer API demo instance to create, update or remove configurations, incidents, or alerts.

If you have an PagerDuty account, you can generate an API key by following the guide in our knowledge base here.