Svrf API Docs

Authentication Endpoint – /app/authenticate

Authenticate an application's Svrf API Key to retrieve an access token to the Svrf API.

Parameters

ParameterTypeDescription
apiKeystringYour application's API key.

Response

The application was successfully authenticated and an Application Token was returned to be used in subsequent requests as the x-app-token header. The expiresIn field denotes how many seconds this token will be valid for.

KeyTypeDescription
successbooleanIf the request was successful.
messagestringAn error message if the request fails.
tokenstringToken to be used in the x-app-token header to access authenticated routes.
expiresInintegerHow many seconds this token will be valid for.

Examples

cURL
curl --request POST \
--url https://api.svrf.com/v1/app/authenticate \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{"apiKey":"YOUR_API_KEY"}'
Node.js
var request = require("request");
var options = {
method: 'POST',
url: 'https://api.svrf.com/v1/app/authenticate',
headers: {accept: 'application/json', 'content-type': 'application/json'},
body: '{"apiKey":"YOUR_API_KEY"}'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});