Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response status code does not indicate success: 401 (Unauthorized). #1227

Open
2 tasks done
Kartoshka2331 opened this issue Oct 13, 2024 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working

Comments

@Kartoshka2331
Copy link

Checklist

Edition

Command Line Interface

Describe your issue here

When I try to download a video, I get the error “Unhandled exception. System.AggregateException: One or more errors occurred. (The response status code does not indicate success: 401 (Unauthorized).)”.

C:\Users\WDAGUtilityAccount\Desktop>TwitchDownloaderCLI videodownload --oauth MY_SECRET_TOKEN --id 2274913337 --ffmpeg-path ffmpeg.exe --quality 1080p60 --output test.mp4
TwitchDownloaderCLI 1.55.0 Copyright (c) lay295 and contributors
[STATUS] - Получение информации о видео [1/4]
Не обработанное исключение. System.AggregateException: Произошла одна или несколько ошибок. (Код состояния ответа не указывает на успех: 401 (Неавторизованный)).
 ---> System.Net.Http.HttpRequestException: Код состояния ответа не указывает на успех: 401 (Unauthorized).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at TwitchDownloaderCore.TwitchHelper.GetVideoToken(Int64 videoId, String authToken) in /home/runner/work/TwitchDownloader/TwitchDownloader/TwitchDownloaderCore/TwitchHelper.cs:line 57
   at TwitchDownloaderCore.VideoDownloader.GetQualityPlaylist() in /home/runner/work/TwitchDownloader/TwitchDownloader/TwitchDownloaderCore/VideoDownloader.cs:line 494
   at TwitchDownloaderCore.VideoDownloader.DownloadAsyncImpl(FileInfo outputFileInfo, FileStream outputFs, CancellationToken cancellationToken) in /home/runner/work/TwitchDownloader/TwitchDownloader/TwitchDownloaderCore/VideoDownloader.cs:line 81
   at TwitchDownloaderCore.VideoDownloader.DownloadAsyncImpl(FileInfo outputFileInfo, FileStream outputFs, CancellationToken cancellationToken) in /home/runner/work/TwitchDownloader/TwitchDownloaderCore/VideoDownloader.cs:line 146
   at TwitchDownloaderCore.VideoDownloader.DownloadAsync(CancellationToken cancellationToken) in /home/runner/work/TwitchDownloader/TwitchDownloader/TwitchDownloaderCore/VideoDownloader.cs:line 49
   at TwitchDownloaderCore.VideoDownloader.DownloadAsync(CancellationToken cancellationToken) in /home/runner/work/TwitchDownloader/TwitchDownloader/TwitchDownloaderCore/VideoDownloader.cs:line 57
   at TwitchDownloaderCore.VideoDownloader.DownloadAsync(CancellationToken cancellationToken) in /home/runner/work/TwitchDownloader/TwitchDownloader/TwitchDownloaderCore/VideoDownloader.cs:line 58
   --- Конец трассировки стека внутренних исключений ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean )
   at System.Threading.Tasks.Task.Wait(Int32 , CancellationToken )
   at System.Threading.Tasks.Task.Wait()
   at TwitchDownloaderCLI.Modes.DownloadVideo.Download(VideoDownloadArgs inputOptions) in /home/runner/work/TwitchDownloader/TwitchDownloader/TwitchDownloaderCLI/Modes/DownloadVideo.cs:line 26
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at TwitchDownloaderCLI.Program.Main(String[] args) in /home/runner/work/TwitchDownloader/TwitchDownloader/TwitchDownloaderCLI/Program.cs:line 34

Maybe I'm doing something wrong?

Add any related files or extra information here

I tried to download 2274913337, just random video.

@Kartoshka2331 Kartoshka2331 added the bug Something isn't working label Oct 13, 2024
@ScrubN
Copy link
Collaborator

ScrubN commented Oct 16, 2024

Strange, you shouldn't even need to provide your oauth for a public video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants