Published on February 1, 2019 (almost 6 years ago)

Node & Elixir SDK Updates: Signed URL JWT Helpers and more!

Matthew McClure
By Matthew McClure2 min readProduct

We spend a lot of time thinking about how we can make our products easy and fun to work with. Our public API is something we hope people find intuitive and reasonable, but the last thing you want to do when kicking off a new project is sit down and write a REST wrapper.

You may have come across our Node and Elixir SDKs already, but we’re happy to announce some newly added features that we ourselves found really helpful internally.

LinkNew Endpoints

Since launching the SDKs originally, we’ve released two additional sets of endpoints:

  • /video/v1/uploads - Direct upload management. Allow your customers to upload files directly to us instead of needing to go through your own, intermediate storage.
  • /video/v1/signing-keys - URL signing key management. Signing keys are used to create tokens for signed URLs when you want control over access to a piece of content.

LinkToken Helper Utilities

When we started building signed URLs, we were excited to use JWTs (or JWS depending on who you ask) since there were so many tools out there for working with them. That’s wonderful, but getting JWTs right, even with a great helper tool, can be difficult. That’s why we’ve added helpers to the Node and Elixir SDKs to help you easily create signed URL tokens for your Mux assets! Let’s look at some examples:

Node

Elixir

LinkWhat are you waiting for? Start signing!

Public playback policies are easy and convenient, but they don’t give you much control over your assets. Using signed playback policies allows you to do useful things in your server-side application, like create playback URLs that are only useful for a short period of time or keep your customers from fiddling with query parameters on that thumbnail you agonized over.

LinkP.S.

We started with Node and Elixir, but we’re actively working on more API wrappers. If you’ve already written your own, let us know so we tell people about it, or give us suggestions for what we should build next. 🔨

Written By

Matthew McClure

Creator of Demuxed and wrangler of meetup speakers. Used to write a lot of React and Elixir code. Still do sometimes, but used to, too.

Leave your wallet where it is

No credit card required to get started.