Skip to content

Avoid percent-encoding for "(" and ")" characters.#9

Merged
ariesclark merged 1 commit into
vrchatapi:mainfrom
Powerbyte7:fix-encoding
Jul 5, 2026
Merged

Avoid percent-encoding for "(" and ")" characters.#9
ariesclark merged 1 commit into
vrchatapi:mainfrom
Powerbyte7:fix-encoding

Conversation

@Powerbyte7

Copy link
Copy Markdown
Contributor

The VRChat API does not accept percent-encoded variants of InstanceID, specifically the characters "(" and ")". This causes an error when attempting the following API call:

https://api.vrchat.cloud/api/1/instances/wrld_28aab3e4-953f-4c85-9223-ef29a0873a6e:31124%7Egroup%28grp_b2a19685-c53e-4c5a-9503-744a5373bf2c%29%7EgroupAccessType%28plus%29%7Eregion%28use%29/shortName
{"error":{"message":"\"malformed url\"","status_code":400,"waf_code":26497}}

When using the raw string without encoding, the API yields a 200 response as expected.

https://vrchat.com/api/1/instances/wrld_28aab3e4-953f-4c85-9223-ef29a0873a6e:31124~group(grp_b2a19685-c53e-4c5a-9503-744a5373bf2c)~groupAccessType(plus)~region(use)/shortName

URLEncoder uses the application/x-www-form-urlencoded percent-encode set, which encodes the the characters "(" and ")".

See vrchatapi/vrchatapi-rust#43 for more details.

The VRChat API does not accept percent-encoded variants of InstanceID, specifically the characters "(" and ")". This causes an error when attempting the following API call:
```
https://api.vrchat.cloud/api/1/instances/wrld_28aab3e4-953f-4c85-9223-ef29a0873a6e:31124%7Egroup%28grp_b2a19685-c53e-4c5a-9503-744a5373bf2c%29%7EgroupAccessType%28plus%29%7Eregion%28use%29/shortName
```
```json
{"error":{"message":"\"malformed url\"","status_code":400,"waf_code":26497}}
```

When using the raw string without encoding, the API yields a `200` response as expected.
```
https://vrchat.com/api/1/instances/wrld_28aab3e4-953f-4c85-9223-ef29a0873a6e:31124~group(grp_b2a19685-c53e-4c5a-9503-744a5373bf2c)~groupAccessType(plus)~region(use)/shortName
```

@ariesclark ariesclark left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't test, nor do we have a Java maintainer, so LGTM.

@ariesclark ariesclark merged commit ebaa14b into vrchatapi:main Jul 5, 2026
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