From e494c1c04ea56ae5ec4337a5b8afef020cd9a04d Mon Sep 17 00:00:00 2001 From: nocci Date: Sun, 8 Mar 2026 11:38:54 +0000 Subject: [PATCH] fix(api): switch to URLSearchParams for OAuth device authorization body --- epic-claimer-new.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/epic-claimer-new.js b/epic-claimer-new.js index c4b5502..2f3349d 100644 --- a/epic-claimer-new.js +++ b/epic-claimer-new.js @@ -98,10 +98,11 @@ const getValidAuth = async ({ otpKey, reuseCookies, cookiesPath }) => { let deviceResponse; try { - deviceResponse = await axios.post('https://account-public-service-prod.ol.epicgames.com/account/api/oauth/deviceAuthorization', { - clientId: '34a02cf8f4414e29b159cdd02e6184bd', - scope: 'account.basicprofile account.userentitlements', - }, { + const params = new URLSearchParams(); + params.append('clientId', '34a02cf8f4414e29b159cdd02e6184bd'); + params.append('scope', 'account.basicprofile account.userentitlements'); + + deviceResponse = await axios.post('https://account-public-service-prod.ol.epicgames.com/account/api/oauth/deviceAuthorization', params.toString(), { headers: { 'Content-Type': 'application/x-www-form-urlencoded', },