From ac1f0e63a7c3bdf3520c5349435d7efb68dff284 Mon Sep 17 00:00:00 2001 From: filoxenace Date: Sat, 7 Mar 2026 13:23:04 -0500 Subject: [PATCH] fix: add CSRF token to get_collectible_item_id request --- pyproject.toml | 2 +- src/rbx_upload/client.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index eee7570..e1eb122 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "rbx-upload" -version = "0.2.3" +version = "0.2.4" description = "Roblox asset upload client" requires-python = ">=3.13" dependencies = [ diff --git a/src/rbx_upload/client.py b/src/rbx_upload/client.py index b11bb2e..c9e625f 100644 --- a/src/rbx_upload/client.py +++ b/src/rbx_upload/client.py @@ -291,9 +291,11 @@ class RobloxClient: async def get_collectible_item_id(self, asset_id: int) -> str | None: """Look up the collectible item ID (UUID) for a given asset ID.""" + csrf = await self._get_csrf_token() response = await self._http.post( self._proxy_url("https://catalog.roblox.com/v1/catalog/items/details"), json={"items": [{"itemType": "Asset", "id": asset_id}]}, + headers={"X-CSRF-TOKEN": csrf}, cookies=self._csrf_cookies, ) response.raise_for_status()