Skip to content

Authorization

There are currently two possibilities how to authorize API requests:

  • OAuth 2.0
  • HMAC

Both methods require the creation of an "application" via the GUI ("Apps" tab) of our webapp. After creating the application, you'll receive a set of application credentials (the "client_id" and "client_secret").

OAuth 2.0

With the OAuth 2.0 option, a bearer token has to be sent together with every API request. Such an OAuth 2.0 access token can be obtained via the /oauth2/token/ API endpoint.

POST /oauth2/token/

HMAC

The second option is to cryptographically sign API requests by calculating a HMAC signature and appending this signature as a query parameter.

HMAC Signing of API Requests

Creating an Application and Obtaining Credentials

Overview

An application provides a set of alternate "login" credentials allowing you to delegate API access under your account to one or more applications (e.g., a script, your website, etc.). This approach offers several benefits:

  • Security: You don't need to expose your actual username and password in application configuration files.
  • Control: You can disable or limit API access for a specific application without affecting your other apps or your global account.
  • Tracking: Applications allow you to track account usage (e.g., download bandwidth of hosted videos) individually per application. This is useful if you have multiple websites, as you can create one app for each site and easily track the download traffic caused by each site.

Steps to Create an Application

  1. Access the Apps Tab:

    • Switch to the "Apps" tab in your My MediaHub dashboard.
    • Click on "Add App".
  2. Enter Application Details:

    • Enter a name for your new app.
    • Click "Create".
  3. Obtain Application Credentials:

    • The newly created app will now show up in the grid.
    • Click on the "Edit" button.
    • From the popup-window, copy and paste your Client ID and Client Secret.