In this guide you will learn how to use the REST APIs
In Metered we provide the REST APIs to perform all the functions that can be done from the dashboard and more.
To view the complete REST API documentation click here.
To use the Metered REST API you need to have an account, if you don't already have an account you can easily signup for a free account from here: https://dashboard.metered.ca/signup
After you have created an account come back here for the next steps. If you have not read the Advanced SDK Guide. we highly recommend that you read it first as it will introduce you to important concepts.
Your metered domain is your
appname.metered.live where appname is the name of your app that you have created during signup.
Suppose during signup you have named your app simpleapp then your metered domain will be
Your appname can also been seen on the sidebar of the dashboard.
2. Acquiring the Secret Key
You will need the Secret Key to authenticate with the API, the Secret Key can be found under the Developers tab on the dashboard.
Once you have obtained the Secret Key we can use it to call the REST API.
Never Expose your Secret Key to the Front End
Secret Key should never be exposed in the Front End and must always be used by your back-end server-side application.
3. Calling the REST API
To call REST API you would have to send the request to your metered domain, and we have learned how to obtain that in the first step, and sending the secretKey as query parameter.
Here is an example cURL request to Create A Room:
curl --request POST \
--url https://yourappname.metered.live/api/v1/api/v1/token \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
You will receive the following response:
4. Explore the Complete REST API
You can find the complete REST API documentation here and explore all the methods that available that you can integrate into your application to create rich experiences for your users.
In the above document, we have described how you can get started with using the REST API, there is a lot more to explore:
- Explore the complete REST API Documentation here
If you have any questions or need any help with the integration feel free to contact us via phone or email.