How to pass token in post method instead of query string

Hi,

Because I don’t have authority over the LA_URL call, I am using LA_URL and am sending a token as a query string at the moment. Is there a way I can pass it instead of query strings in the post method for security reasons? I’ve included a sample of my code below.

     var conf = {
        key: 'fc16a4eb-a343-4098-9660-1d0886c02be9'
      };
     
     var source = {
     title: 'Demo',
     dash: 'https://amsplaybackproxy.azurewebsites.net/1sph/ams-migration-output/asset-e771f0cf-679e-4998-a82c-3fa8341efdae/video_AppleMusicUpNext_AmyShark_.mpd?token=eyJhbGciOiJIUzI1NiJ9.eyJhdWRpZW5jZSI6InJhdGluZ3Nwcm8iLCJleHAiOjE3MTA',
     drm: {
     clearkey: {
     LA_URL: "https://amsplaybackproxy.azurewebsites.net/getkey?token=eyJhbGciOiJIUzI1NiJ9.eyJhdWRpZW5jZSI6InJhdGluZ3Nwcm8iLCJleHAiOjE3MTA4NTE2MTMsImlhdCI6MTcxMDc2NTIxMywidXJuOnNwaGVyZXg6d2F0ZXJtYXJrc2VydmljZTpjb250ZW50a2V5aWRlbnRpZmllciI6IkY1MzQ3ODNGNjk1NjU2NjYzRDc3Q0JBRkQzNUNGNTMzQjI3QjJBMTkxRDgxMzk3QzBCNjQxQTZENURGRDA3QkM2QjJEODRCN0RENkUzM0EzMDE5QkE1RjMwRTgxREI2QkJDMTBDOTA3QTk5M0YzMzJBMEJBNThGQzMyMTEzQzdGNkU4MTc4OEM5RjE1MzI5QzIxQUI0MkZBMUUxRURBM0EzQTcyNDBBRjY4NzBDQzEzNDlEOENCNTRBMzIzQTA0RkNCNDUwRDZGQ0MzMEQxNkJDNDhXXXg2MUE2M0FDMzgyIiwiaXNzdWVyIXXX3BoZXJleCJ9.O6jOfA6L_D-6j61kwjAoFXXXgzuNUeNHsYkLiHtiZs8",
     headers: {
     'content-type': 'application/json'
     }
     }
     }
     };
     
     
      var player = new bitmovin.player.Player(document.getElementById('player'), conf);
      player.load(source);

Hello @rajeshrai0512!

In order to achieve this you can use our NetworkAPI.

There are two ways to achieve the desired behavior.

  1. You could use preprocessHttpRequest to manipulate the request to your liking.
  2. You could use sendRequest where you have to take care of executing the request yourself.

Pls keep in mind that if you want to change the license request it needs to be supported by the licensing server.

Kind regards,
Thomas