MixV2 / EpicResearch

Research about Epic Games' non-documented API
338 stars 82 forks source link

errors.com.epicgames.modules.profiles.invalid_payload #133

Closed 2ir closed 1 year ago

2ir commented 1 year ago

I'm getting this error on QueryProfile:

{
    "errorCode":"errors.com.epicgames.modules.profiles.invalid_payload",
    "errorMessage":"Unable to parse command com.epicgames.fortnite.core.game.commands.QueryProfile. Could not deserialize payload for com.epicgames.fortnite.core.game.commands.QueryProfile",
    "messageVars":[
        "com.epicgames.fortnite.core.game.commands.QueryProfile",
        "Could not deserialize payload for com.epicgames.fortnite.core.game.commands.QueryProfile"
    ],
    "numericErrorCode":12806,
    "originatingService":"fortnite",
    "intent":"prod-live"
}

This is my code:

def QueryProfile():
    account_id = "885916bd0760432b993f1bb930d9bf7a"
    url = f"https://fortnite-public-service-prod11.ol.epicgames.com/fortnite/api/game/v2/profile/{account_id}/client/QueryProfile?profileId=athena&rvn=-1"
    headers = {"Authorization": f"bearer {access_token}"}
    r = requests.post(url, headers=headers)
    print(r.text)
2ir commented 1 year ago

I had to add payload = {} and data=payload on the request