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

VRChat APIが403を返すようになったのでUserAgent文字列を追加 #10

Merged
merged 1 commit into from
Apr 5, 2021

Conversation

yokra9
Copy link
Contributor

@yokra9 yokra9 commented Apr 4, 2021

VRChat APIがUser-Agentヘッダを設定していない状態だと403を返却してしまい、ワールド情報等の取得に失敗するようになっていました。そのため、HttpClient.DefaultRequestHeaders.Add() でUserAgent文字列を設定するよう修正しました。

※こちらがツールであることが分かりやすいようにWget/1.20.3を指定してみましたが、実際なんでもいいと思います。VRChat的にツールからの利用がNGの場合に蹴ってもらいやすいかなという配慮です。

よろしくお願いします!

@nukora
Copy link
Owner

nukora commented Apr 5, 2021

PRありがとうごさいます!
確かにUserAgentがないとコケてしまう事を確認しました。
UserAgentとして何を送るかについては良い案が浮かばないので、このままマージさせていただきます!

@nukora nukora merged commit 3cbeb6f into nukora:master Apr 5, 2021
@yokra9 yokra9 deleted the fix-add-useragent branch April 5, 2021 12:29
creepiez pushed a commit to creepiez/VRChatActivityTools that referenced this pull request Jan 4, 2024
VRChat APIが403を返すようになったのでUserAgent文字列を追加
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants