Reseller API Documentation

Summary

Reseller API is an API, where the Resellers can list, search and buy videos from Glymt.

Contact us

Reseller API endpoint

The base endpoint for all the requests regarding the Reseller API

Authentication

The authentication method used is OAuth2.0.

This will generate a new access token valid for 2hours.

The {user_name} and {user_password} refers to the username and password of the Reseller Glymt account

The {client_id} and {client_secret} refers to the client id and client secret provided by Glymt to the Reseller, you can verify this information on your Glymt account page

Endpoint
POST/auth/login
POST /auth/login
{
  "grant_type": "password", 
  "username": {user_name}, 
  "password": {user_password}, 
  "client_id": {your_client_id}, 
  "client_secret": {your_client_secret}
}
Response
{
  "status": 200,
  "token": {access_token},
  "access_token": {access_token},
  "expiration_date": 5485
}

Videos

Endpoints
GET/videos/search
POST/videos/purchase
GET/videos/purchases
Search Videos

This will retrieve a video list relatives to your search term.

GET /videos/search
{
  "page": 1,
  "q": {search_term}
}
Response
{
  "status": 200,
  "videos": 
  [{
    "id":{video_id},
    "title": {video_title},
    "duration": {video_duration},
    "resolution_height":1080,
    "resolution_width":1920,
    "fps":25,
    "has_audio":true,
    "get_cover_url": {video_cover_url},
    "get_preview_filepath": {video_preview_url},
        "get_preview_hd_filepath": {video_preview_hd_url}}
  }]
}
List Videos

This will retrieve a video list relatives videos indiscriminately.

GET /videos
{
  "page": 1
}
Response
{
  "status": 200,
  "videos": 
  [{
    "id":{video_id},
    "title": {video_title},
    "duration": {video_duration},
    "resolution_height":1080,
    "resolution_width":1920,
    "fps":25,
    "has_audio":true,
    "get_cover_url": {video_cover_url},
    "get_preview_filepath": {video_preview_url},
        "get_preview_hd_filepath": {video_preview_hd_url}}
  }]
}
Purchase video

This will purchase a video from Glymt and return the video url.

The video url will be available for 2 hours.

POST /videos/purchase

{ 
  "id": {vide_id}
}
Response

{ 
  "status": 200, 
  "message": "Video purchased successfully.",
  "video_url": {video_url}
}
Video purchases

This will return all of the purchases made by the Reseller.

ResponseGET /videos/purchases

{
    "status": 200,
    "licensed_videos": [
        373710
    ],
    "message": "Licenses loaded successfully."
}

Account

This will return your account balance.

ResponseGET /account/current_balance

{
    "status": 200,
    "current_balance": [
        300.00
    ],
    "message": "Balance loaded successfully."
}