Svrf API Docs

Authentication

Authenticate Your Application

Svrf requires access tokens to be passed with all non-authentication endpoint requests. You can retrieve your access token by sending your API key to the Authenticate Endpoint. Follow the guide below to learn how to authenticate your application and make requests.

1. Obtain an App Token

First, you'll need to obtain your app token by sending a POST request to the Authenticate Endpoint, providing your apiKey in the body.

Example Authentication Request

curl --request POST \
--url https://api.svrf.com/v1/app/authenticate \
--header 'content-type: application/json' \
--data '{"apiKey": "xyxyxyxyxyxy"}'

Example Response

HTTP/2 200
content-type: application/json; charset=utf-8
cache-control: private
{
"success": true,
"message": "Successfully authenticated.",
"token": "xxxxx.yyyyy.zzzzz",
"expiresIn": 5184000
}

2. Use the App Token to Make Requests

When making requests, provide the returned token in the header in the field x-app-token . The token is valid for multiple requests, but expires after the returned expiresIn elapses in seconds.

In this example, we're requesting the Trending Endpoint:

curl --request GET \
--url https://api.svrf.com/v1/vr/trending \
--header 'accept: application/json' \
--header 'x-app-token: xxxxx.yyyyy.zzzzz'