Tutorials · 1 min read

Authentication steps

Every call made to a api.video API requires an access_token. This tutorial will walk you through the authentication steps.

Doug Sillars

March 25, 2020

Every call made to an api.video API requires an access_token. This tutorial will walk you through the authentication steps.

NOTE: All of the SDKs abstract out the need for authentication.

You will need your API key to obtain the access_token. You can find your API key in your Dashboard.

This tutorial uses the sandbox endpoint. To upload your video in production, simply replace all sandbox.api.video instances with ws.api.video.

First, call the authentication endpoint and get your access token.

Example - Curl Request

javascript

Example - Http Request

POST /auth/api-key HTTP/1.1
Host: sandbox.api.video
Content-Type: application/json
{
	"apiKey": "your_api_key"
}

Example Response:

javascript

The response has the access token and a refresh token. The "expires_in" parameter tells you that the token is valid for 3600 seconds = 1 hour.

Conclusion

That's all there is to it! Grab your api_key from your dashboard and give it a try. If you run into any issues, feel free to reach out on our forum, and we'll gladly help out!

Try out more than 80 features for free

Access all the features for as long as you need.
No commitment or credit card required

Video API, simplified

Fully customizable API to manage everything video. From encoding to delivery, in minutes.

Built for Speed

The fastest video encoding platform. Serve your users globally with 140+ points of presence. 

Let end-users upload videos

Finally, an API that allows your end-users to upload videos and start live streams in a few clicks.

Affordable

Volume discounts and usage-based pricing to ensure you don’t exceed your budget.