You can read this article in Japanese (日本語) | Spanish (español)
Dubber API – Getting started
Dubber API can be used to extract data and recordings from your Dubber portal as required. Dubber uses Mashery keys to manage access to the API and as a first step to using the API, you need to register on the Dubber Development platform and obtain a Mashery key and secret.
The Basic Dubber API is free to use but should you want to perform advanced operations such as extracting data, you will need Premium Dubber API access, please contact your Dubber account manager, Service Provider or Partner for further information on Premium API.
Basic API | Premium API |
Standard API endpoints that enable auto-provisioning and user management |
|
|
|
|
|
|
|
|
|
|
To begin your journey with the Dubber API please follow the below steps.
Gaining a Mashery key
To gain a Mashery key, you must create an account on the Dubber API page (https://developer.dubber.net/). Click “Join now” to create your account.
If you already have an account, select “Sign in" from the upper right of the window and log in to the page. If you have never set up a key before you will be greeted by the following page.
For every application you create that uses the Dubber API, you must register a new key for that application. To do this, select Applications and when the option shows, click “Create a New App”.
Fill out the form with the details of your application. The only Mandatory field is the application name, but a description of what the application is trying to achieve is appreciated. Here you also find “Select which Web APIs this application will use”, followed by a listing of each of the Dubber API environments.
By default, each environment is selected but we ask that you disable the platforms you do not require. For example, if I only need the Australian production environment and the Sandbox environment, I would only leave these selected and de-select the others.
Agree to the “Terms of service” then “Register Application”. When the application is registered, you will receive a notification. Click on the “My Account” link to see your allocated keys.
When you first register for a Mashery key, the key will show it is in a status of waiting. Please request for the key to be activated by our support team if this status does not change.
💡Note: Email support@dubber.net with the Mashery key that you need to activate if it does not change status. Our support team will activate the key for you and let you know that it is now active.
Using the API
There is documentation on how to use the API and each API call online at https://developer.dubber.net/docs.
When using the API, all API calls must be authenticated using a bearer token. A bearer token is valid for 24 hours, so should be stored if making multiple calls. If you constantly request a token each time a call to the API is made, you may exceed the limit of 500 calls for a token in a 24-hour period.
The most common is Authorisation by Password (https://developer.dubber.net/docs/read/end_point_samples/Authorization_by_Password).
The command for this method is as follows:
curl -i -k -X POST "https://api.dubber.net/<Region>/v1/token" -d 'client_id=<Mashery_Client_ID>&client_secret=<Mashery_Client_Secret>&username=<Dubber_Auth_ID>&password=<Dubber_Auth_Token>&grant_type=password' \
-H 'content-type: application/x-www-form-urlencoded'
- <Region> will be the system you are trying to access. If you are accessing the sandbox environment, then this would be sandbox.
- <Mashery_client> is a valid Mashery Key for the application. You would need to register and obtain a key and secret before requesting for a token. This can be viewed when you log in to https://developer.dubber.net.
- <Mashery_Client_Secret> is the associated secret that you receive with your key. This can be viewed when you log in to https://developer.dubber.net.
- <Dubber_Auth_ID> is found in the Dubber portal on the API tab as Auth ID.
- <Dubber_Auth_Token> is also found in the dubber portal on the API tab as Auth Token.
In response to the above, if done correctly, you will receive the following which includes the bearer token.
HTTP/1.1 200 OK
Cache-Control: max-age=0, private, must-revalidate
Content-Type: application/json; charset=utf-8
Date: Wed, 23 Oct 2013 01:48:52 GMT
ETag: "ed44e2cef7f039db8eb2f01a29ac6eb5"
Server: nginx
Status: 200 OK
X-Mashery-Responder: prod-j-worker-ap-se-2a-01.mashery.com
X-Rack-Cache: invalidate, pass
X-Request-Id: 6cb7ed773c6a7b0afdf66f571641298c
X-Runtime: 2.003498
transfer-encoding: chunked
Connection: keep-alive
{
"return_type": "json",
"access_token": "4g35nq6kah5mhcv35fxt6apc",
"token_type": "bearer",
"expires_in": 240,
"refresh_token": "4992uv5snjq9kdgq528zqmez",
"scope": null,
"state": null,
"uri": null,
"extended": null
}
Store the “access token” for use with further API calls.
A common example of any API call is to retrieve recordings for an account. The first part of the command asks for the access token as follows:
curl -i -k -H "Authorization: Bearer <ACCESS_TOKEN>" \
-X GET https://api.dubber.net/sandbox/v1/recordings/3996569195?attachment;filename=<file>.mp
For further support, please contact our support team (support@dubber.net).