diff --git a/epic-claimer-new.js b/epic-claimer-new.js index 84d9e0c..c4b5502 100644 --- a/epic-claimer-new.js +++ b/epic-claimer-new.js @@ -47,7 +47,7 @@ const fetchFreeGamesAPI = async () => { const pollForTokens = async (deviceCode, maxAttempts = 30) => { for (let i = 0; i < maxAttempts; i++) { try { - const response = await axios.post('https://account-public-service-prod.ol.epicgames.com/account/api/oauth/token', { + const response = await axios.post('https://api.epicgames.dev/epic/oauth/token', { grant_type: 'urn:ietf:params:oauth:grant-type:device_code', device_code: deviceCode, client_id: '34a02cf8f4414e29b159cdd02e6184bd', @@ -101,6 +101,10 @@ const getValidAuth = async ({ otpKey, reuseCookies, cookiesPath }) => { deviceResponse = await axios.post('https://account-public-service-prod.ol.epicgames.com/account/api/oauth/deviceAuthorization', { clientId: '34a02cf8f4414e29b159cdd02e6184bd', scope: 'account.basicprofile account.userentitlements', + }, { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, }); } catch (error) { console.error('Device code flow failed (fallback to manual login):', error.response?.status || error.message); @@ -398,3 +402,4 @@ export const claimEpicGamesNew = async () => { export default claimEpicGamesNew; +