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

Requests blocked by WAF due to User-Agent #7

Open
theautonomousdev opened this issue Jul 18, 2024 · 3 comments
Open

Requests blocked by WAF due to User-Agent #7

theautonomousdev opened this issue Jul 18, 2024 · 3 comments

Comments

@theautonomousdev
Copy link

By default requests are blocked by the WAF due to User-Agent header with the response:

{
	"error": {
		"message": "\"please identify yourself with a properly formatted user-agent containing application name, version and contact information. thank you!\"",
		"status_code": 403,
		"waf_code": 13799
	}
}

Overriding the baseOptions on the configuration to add a custom User-Agent resolves the issue:

const configuration = new vrchat.Configuration({
  username,
  password,
  baseOptions: {
    headers: { "User-Agent": "Test" },
  },
});

Are you able to add a custom User-Agent by default or update the example code to include a custom User-Agent so it's clear that it's required?

@Rexios80
Copy link

We should not add a user agent by default, and even including one in the example is a bit iffy because people will just copy/paste the code and not change it, but maybe we could show it in the example in a non-functional way?

@theautonomousdev
Copy link
Author

We should not add a user agent by default, and even including one in the example is a bit iffy because people will just copy/paste the code and not change it, but maybe we could show it in the example in a non-functional way?

I see your point, I think having it noted somewhere under the "Getting Started" section in the README or as a comment in the example code should suffice.

Even though the response error message is clear about what the issue is I had to dig into the code to identify how to override the User-Agent as it wasn't clear how or even if it was possible.

@ariesclark
Copy link
Member

TimmyFriendTracker/1.5.1 [email protected] is an example we've used before, and it is blocked, so it doesn't work by default unless you change it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants