#
Authorization
RovinieteOnline uses API keys to authenticate and authorize access to its API. You received your unique authorization
key (named within the documentation as [YOUR_API_KEY]) during the onboarding process.
To use the API, include your API key in the headers of all requests to the server, using the key X-Authorization.
#
Testing Your Authorization Key
Use the code samples below to verify your authorization key. This request will be sent to the /v1/ping endpoint.
curl -H "X-Authorization: [YOUR_API_KEY]" "https://api.rovinieteonline.ro/v1/ping"
try {
const res = await fetch("https://api.rovinieteonline.ro/v1/ping", {
method: "POST",
headers: {
"X-Authorization": "[YOUR_API_KEY]",
"Content-Type": "application/json"
}
})
const json = await res.json()
console.log(json)
} catch (err) {
console.log(err)
}
If everything is set up correctly, you will receive this response:
{ "pong": true }