Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QueryProfile Format, error of authentification #74

Open
System32-0101 opened this issue Oct 8, 2021 · 3 comments
Open

QueryProfile Format, error of authentification #74

System32-0101 opened this issue Oct 8, 2021 · 3 comments

Comments

@System32-0101
Copy link

System32-0101 commented Oct 8, 2021

Hey, im trying to get the cosmetics and some info player using the QueryProfile, I use Node.JS and axios. My code is:

let head = {
'Content-Type': 'application/json',
'Authorization': `bearer ${res.data.access_token}` //<- Here i use the access_token previously defined
   }
   //I think data is not necessary but I use it too
   let data = {
     'grant_type': 'authorization_code',
     'code': code
   }
   let res3 = await axios.post(`https://fortnite-public-service-prod11.ol.epicgames.com/fortnite/api/game/v2/profile/${res.data.account_id}/client/QueryProfile?profileId=athena&rvn=-1`, head, data).catch(e => console.log(e))
  console.log(res3.data)```
  The error is: 401
@System32-0101
Copy link
Author

I repaired that in axios is: axios.post(url, data, headers) and i put headers before data.
But it still giving me errors... please help

@MixV2
Copy link
Owner

MixV2 commented Oct 12, 2021

Are you sure you've generated a valid access token? Check res.data.access_token and make sure it is not undefined.

Also, you are using the wrong payload for the QueryProfile request. The payload (data) should just be {}.

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

No branches or pull requests

3 participants
@MixV2 @System32-0101 and others