Serverless project APIs returning 401's

Hello,

I created a serverless project in elastic the other day as I wanted to run some API queries. I then clicked on the ? icon in the top right of my portal and selected “Connection Details”, copied the elasticsearch endpoint and created an API key with read only permissions as shown below.

{

"read-only-role": {

"cluster": \[\],

"indices": \[

  {

    "names": \[

      "\*"

    \],

    "privileges": \[

      "read"

    \],

    "allow_restricted_indices": false

  }

\],

"applications": \[\],

"run_as": \[\],

"metadata": {},

"transient_metadata": {

  "enabled": true

}

}

}

Then from Postman I am trying to run an API query for /users/auth/keys with the endpoint and API key I have but I get back 401 unauthorized. The error reads:

Any ideas?

Figured out the issue, I had to create a serverless project API key which I missed before.