403 returned while trying to post metrics to New Relic


I ran the below curl command and am facing 403 error. Please note that i am using the right API Key in the headers and still getting 403 Error.

curl -vvv -k -H "Content-Type: application/json" \
-X POST https://metric-api.newrelic.com/metric/v1 \
--data '[{ 

Umesh - Pegasystems

Hey Umesh,

Thanks for reaching out to the community.

Reviewing the status code in our doc’s here: Trace API general requirements and limits | New Relic Documentation. The error code is related to an authentication error. This may occur with an invalid license key or if you lack the necessary entitlement to use the Trace API.

Can you confirm you are using a User Key and not the accounts REST API key as that key can only be used for Read-only requests: New Relic API keys | New Relic Documentation

Let me know.


1 Like

I used the Insert Keys and it worked fine! We can close the topic!