Skip to content

A temporary, light-weight, high-performance solution to get access token of Microsoft Stream without any browser technologies like Chrome/Selenium.

License

Notifications You must be signed in to change notification settings

toolkitx/microsoft-stream-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@toolkitx/microsoft-stream-auth

CIStatus npm version

A temporary, light-weight, high-performance solution to get access token of Microsoft Stream without any browser technologies like Chrome/Selenium.

Why you need this? Accroading to the Office 365 roadmap, Microsoft doesn't provide any public APIs to access the Stream videos event you add API permissions to your app. So with the token get by microsoft-stream-auth, you can access the internal API of Stream, like upload video, download video etc.

Demo

How it works

The microsoft-stream-auth go through the login flow by sending HTTP requests. It means it might not work in the feature.

Installation

npm install @toolkitx/microsoft-stream-auth

Simple to use

const streamAuth = require('@toolkitx/microsoft-stream-auth');
const result = await streamAuth({account: 'User Account', pwd: 'User Password'});

Then you will get below object:

{
    "accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dC....",
    "apiGatewayUri": "https://aaea-1.api.microsoftstream.com/api/",
    "apiGatewayVersion": "1.3-private",
    "accessTokenExpiry": "2019-12-09T08:19:25.6166735+00:00"
}

How to run test

  1. Set your account and password in test/config.js
  2. Run below command:
npm test

Enjoy!

About

A temporary, light-weight, high-performance solution to get access token of Microsoft Stream without any browser technologies like Chrome/Selenium.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published