Mediaflow Developer Docs
Mediaflow Developer Docs
  • Welcome
  • Mediaflow API
    • Mediaflow API Docs
  • Integrations
    • Integration Guides
      • Integration with JavaScript File Selector
      • Integrating directly with Mediaflow API
      • Authentication
    • File Selector Integration Kit
  • Video Player API
    • Getting Started
    • Options
    • Getters & Setters
    • Iframe API
Powered by GitBook
On this page
  1. Integrations
  2. Integration Guides

Authentication

PreviousIntegrating directly with Mediaflow APINextFile Selector Integration Kit

Last updated 7 months ago

To communicate with the API you first need to authenticate through OAuth using a request_token, client_id, and client_secret that are supplied to you by us.

Start by sending a POST Form request with your request_token and a of your client_id and client_secret like this:

POST https://accounts.mediaflow.com/1/oauth2/token
Content-Type: application/x-www-form-urlencoded
Authorization: Basic eW91cl9jbGllbnRfaWQ6eW91cl9jbGllbnRfc2VjcmV0 

grant_type=refresh_token&refresh_token=$your_request_token

This should give you a response with an access token like this:

{
  "access_token" : "$access_token",
  "refresh_token" : "",
  "token_type" : "Bearer",
  "expires_in" : 1055
}

With the access_token you can now send requests to the API by using it in an Authorization bearer header.

Authorization: Bearer $access_token
basic access authentication header