brettlangdon / node-dogapi

Datadog API Node.JS Client
https://brettlangdon.github.io/node-dogapi/
105 stars 45 forks source link

Client returns status ok for most of random API keys with length of 32 #71

Closed PatrykMilewski closed 4 years ago

PatrykMilewski commented 4 years ago

When I initialize dogapi with for example:

dogapi.initialize({
    api_key: "12123456789012345678901234567890",
    api_host: "api.datadoghq.eu"
})

Which is random API key with length of 32 chars, then it returns status: ok after calling dogapi.metric.send_all.

To make stuff more interesting, for api_key: 123456789012345678901234567890az it raises an error with "Forbidden" description.

For keys with api_key.length !== 32 it's always "Forbidden".

Is this expected behaviour due to limitations of DataDog API? It's a little bit confusing for me.

PatrykMilewski commented 4 years ago

Closing it since the issue is present when accessing DataDog API directly.