Guides: Get Started with Mux’s Postman Collection

0:00

Hey, this is Thuy (Twee). I'm a Community Engineer at Mux. Today,

0:04

I'll be showing you how to get started quickly with Mux's Postman collection.

0:09

To get started with the Mux API, you're going to need an account first.

0:13

You can make an account by going to the Mux homepage, at mux.com,

0:17

Scrolling to the bottom and clicking create account.

0:22

Once you create an account,

0:24

you can go into your settings on the left nav bar,

0:28

left side menu, and click generate new token.

0:34

Let's click the big green button, generate token.

0:38

We have our access token ID and our secret key.

0:41

Let's add those to our environment variables in the Mux Postman collection. For

0:46

the sake of time,

0:47

I've already gone and added these credentials to the Postman collection,

0:51

but here's a little sneak peek so that you know what to look for. In

0:56

Postman, you can create,

0:58

a new environment where you can save your token ID and your secret key as

1:03

a secret. And then every time that you make a request after that,

1:07

it will make it with the appropriate credentials.

1:10

There are a couple requests that I wanna show you how to do.

1:13

The first one has to do with assets.

1:17

Assets are any media content that is stored or live streamed

1:22

inside Mux. It could be audio, video, or text.

1:27

Let's start by creating an asset.

1:30

Let's go to post and then hit send.

1:39

We've got data back about our asset,

1:41

but the thing that we really want is the playback ID.

1:44

We can use this playback ID to stick it inside of one of the players

1:49

that Mux offers. Um, in order to play this asset back.

1:55

Let's copy our playback ID and use something like Mux Player.

2:00

So Mux offers a,

2:03

an open source web component called Mux Player,

2:08

where you can just easily paste in your playback ID and it will play the

2:13

video that you pass it. So we just copied our playback ID from Postman.

2:17

Let's paste it in here. Save it. And what do we get?

2:23

We get the test video.

2:26

Last, but not least, is live streams.

2:30

Similar to assets earlier in the quick start,

2:34

you can create a live stream by making a post request.

2:38

This is the data that you're gonna get back.

2:40

You'll see a very familiar playback ID.

2:45

After you run the live stream,

2:48

you're able to take the playback ID and stick it into a player like the

2:53

Mux Player that I showed you earlier and play the livestream.

2:58

This is an example of what that would look like once you have an active live

3:02

stream that is complete. You can take that playback ID,

3:06

stick it into the playback ID section of the Mux Player,

3:10

change the stream type from on-demand to live. And there you go!

3:13

You have playback for your live stream. Well,

3:19

there you have it.

3:20

That was an under 10 minute quick start Mux's API via the Mux

3:25

Postman collection.

3:26

We showed you how to set up your Postman collection with basic authentication,

3:31

and also walked you through some of the most popular requests that people make

3:35

with the Mux API,

3:37

such as creating an asset and creating a live stream,

3:41

plus all of the extra context and resources that you might need

3:46

to go forth and build all the beautiful video applications that you can build

3:50

with the Mux API. That's it!

3:53

This was Thuy (Twee). I'm out.