Skip to content

Prevent percent-encoding on InstanceID#584

Draft
Powerbyte7 wants to merge 1 commit into
vrchatapi:mainfrom
Powerbyte7:percent-encoding-fix
Draft

Prevent percent-encoding on InstanceID#584
Powerbyte7 wants to merge 1 commit into
vrchatapi:mainfrom
Powerbyte7:percent-encoding-fix

Conversation

@Powerbyte7

@Powerbyte7 Powerbyte7 commented Jun 27, 2026

Copy link
Copy Markdown

This PR fixes an issue with url encoding of InstanceID in URLs.

The VRChat API does not accept percent-encoded variants of InstanceID, specifically the characters ~(). 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

The workaround I found for this, is to set the schema type to password instead of string. This skips the urlencode call inside of the SDK. The Rust template only does URL encoding for the string type, as is shown here. A bit ugly, but it works.

More testing is needed before merging this fix, as I have only tested generation of the Rust SDK.

@Powerbyte7 Powerbyte7 changed the title Prevent percent-encoding on InstanceID and WorldID Prevent percent-encoding on InstanceID Jun 27, 2026
@Powerbyte7 Powerbyte7 force-pushed the percent-encoding-fix branch from 09cffd3 to dc48615 Compare June 27, 2026 23:13
@Powerbyte7 Powerbyte7 force-pushed the percent-encoding-fix branch from dc48615 to 1277727 Compare June 27, 2026 23:14
@ariesclark ariesclark requested a review from Rexios80 June 27, 2026 23:16
@Powerbyte7 Powerbyte7 marked this pull request as draft June 28, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant