destreamer icon indicating copy to clipboard operation
destreamer copied to clipboard

Fetching videos info... Error: Request failed with status code 403

Open sneetsher opened this issue 3 years ago • 1 comments

May be similar or related to #285 #268 #26 .

Any way it fails with same error multiple times then I could download one video then keep failing, still could not figure out cause. Tried with list and single video.

OS: MacOS 11.5.1

Launch command used: ./destreamer.sh -v -k -cc -i https://web.microsoftstream.com/video/dbd1568c-ce82-4e89-8f3f-b7ad9a7ea553

Verbose log
[VERBOSE] Using ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers

Access token still good for 32 minutes.


[VERBOSE] Session and API info 
	 API Gateway URL: https://usea-1.api.microsoftstream.com/api/
	 API Gateway version: 1.4-private

Parsing video/group urls

[VERBOSE] List of GUIDs and corresponding output directory 
	https://web.microsoftstream.com/video/dbd1568c-ce82-4e89-8f3f-b7ad9a7ea553 => videos 

Fetching videos info... 


[WARNING] Got HTTP code 403. Retrying request...

[WARNING] Here is the error message: 
{
  error: {
    code: 'Forbidden',
    message: 'The authenticated user is not authorized to access this resource.'
  }
}

[WARNING] We called this URL: https://usea-1.api.microsoftstream.com/api/videos/dbd1568c-ce82-4e89-8f3f-b7ad9a7ea553?$expand=creator&api-version=1.4-private

[ERROR] Error: Request failed with status code 403
    at createError (/Users/user/destreamer/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/Users/user/destreamer/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/Users/user/destreamer/node_modules/axios/lib/adapters/http.js:269:11)
    at IncomingMessage.emit (node:events:377:35)
    at endReadableNT (node:internal/streams/readable:1312:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

I opened this link https://usea-1.api.microsoftstream.com/api/videos/dbd1568c-ce82-4e89-8f3f-b7ad9a7ea553?$expand=creator&api-version=1.4-private with same browser and it does work fine (a json with video meta data and links)

The videos are playable on the web interface.

I still have also log for the successfully downloaded video.

Verbose log ``` ./destreamer.sh -v --cc -i https://web.microsoftstream.com/video/8e09e116-a58b-49cf-a0a0-975207426f95

[VERBOSE] Using ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers

Access token still good for 37 minutes.

[VERBOSE] Session and API info API Gateway URL: https://usea-1.api.microsoftstream.com/api/ API Gateway version: 1.4-private

Parsing video/group urls

[VERBOSE] List of GUIDs and corresponding output directory https://web.microsoftstream.com/video/8e09e116-a58b-49cf-a0a0-975207426f95 => videos

Fetching videos info...

Found subtitles for Z.

Downloading Video: Z

[VERBOSE] Extra video info Video m3u8 playlist URL: https://usea-1.api.microsoftstream.com/api/videos/manifest?api-version=1.0&playbackurl=https://streamusea1su031.azureedge.net/2a86c806-b417-4764-a5e3-8e0ecebf7eae/v.ism/manifest(format=m3u8-aapl) Video tumbnail URL: https://usea-1-content.api.microsoftstream.com/api/thumbnails/3/18ea4b92-caae-411d-9fcc-59e8b0034d79/MS0yY3J3bnFpeW13bnphNmJnbmdoZTZ4c3FkZV8xXzMyMHgxODAucG5n?validTill=2021-09-16T00%3a00%3a00.0000000Z&aadUserOId=86e4ade5-28f8-4dbe-9b9e-c7fabf0f8846&encoding=base64&api-version=1.4-private&signature=LLrGoqQ9EnevBq%2fVJwF%2fn%2b66JYZwISnjuwU3sX2uNZ0%3d Video subtitle URL (may not exist): https://usea-1-content.api.microsoftstream.com/api/texttracks/3/7f971c0f-0c04-4b7d-87e1-8005530801de/MzlmMTFhNjMtNmE4MC00OGY2LTk2NzItMjFmNzg5Y2Y1MWU3LnYxLnZ0dA?validTill=2021-09-16T00%3a00%3a00.0000000Z&aadUserOId=86e4ade5-28f8-4dbe-9b9e-c7fabf0f8846&encoding=base64&api-version=1.4-private&signature=d6F6BMhU05wbkFxdnh%2brUyhVBgBQSDEtJ4yrk47tIKQ%3d Video total chunks: 57.3

Spawning ffmpeg with access token and HLS URL. This may take a few seconds...

progress [██████████████████████████████████████████████████████████] 100% 546.0kbits/s 0s

Download finished: videos/Z - 2021-03-11 #8e09e116.mkv

</details>


sneetsher avatar Sep 16 '21 18:09 sneetsher

I'm sorry for the late reply but life got in the way. Do you still have this issue?

lukaarma avatar Oct 15 '21 21:10 lukaarma

@lukaarma me too on similar train. Anyway, I didn't meet user who has access for some time.

I could download it using a VPN, while have login issue inside company network. Not a big deal.

I close this issue report as not reproducible. Thank you very much.

sneetsher avatar Dec 17 '22 07:12 sneetsher