azureazure-media-servicesazure-media-player

Generating a JWT token for Azure Media Services


I am experimenting with DRM in Azure Media Services but I am having some problems with the JWT token. In order to generate a JWT token for testing in https://ampdemo.azureedge.net/ I am using https://jwt.io/. In the payload box I have:

{
  "iss": "myIssuer",
  "aud": "urn:myAudience",
  "exp": 1710807389,
  "nbf": 1550000000
}

And the secret key is from what is generated in the Content key policy in Azure. Why doesn't this work?


Solution

  • You can read the offical document with name is How and where did I get a JWT token before using it to request a license or key?

    From the document, we can see GetTokenAsync function to generate JWT token.

    Hope my answer can help you.