Skip to content

Refresh Token randomly is invalid #130

@mr-jakkopp

Description

@mr-jakkopp

I run a little private website to have my Fortnite XP progress displayed. I am using the EpicAPI to connect to the QueryProfile which generally works very well. I automated this process to update my stats every 5 minutes using Google App Script to fetch my website. I run into the following issue though. Out of nowhere, rather than getting my auth key and refresh token extended, I get the following response:

May 22, 2023, 6:49:20 PM:
{"errorCode":"errors.com.epicgames.account.auth_token.invalid_refresh_token","errorMessage":"Sorry the refresh token 'MY_REFRESH_TOKEN' is invalid","messageVars":["MY_REFRESH_TOKEN"],"numericErrorCode":18036,"originatingService":"com.epicgames.account.public","intent":"prod","error_description":"Sorry the refresh token 'MY_REFRESH_TOKEN' is invalid","error":"invalid_grant"}

I usually recieve the following (success message):

May 22, 2023, 6:44:20 PM
{"access_token":"MY_TOKEN","expires_in":7200,"expires_at":"2023-05-22T11:14:20.132Z","token_type":"bearer","refresh_token":"MY_REFRESH_TOKEN","refresh_expires":28800,"refresh_expires_at":"2023-05-22T17:14:20.132Z", and so on

As you can see, these responses were only 5 minutes apart but produces these results. Is there a way of avoiding this issue? Or is there a workaround? Is there any information on this in the docs that I missed or by Epic Games?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions