LeleDerGrasshalmi / FortniteEndpointsDocumentation

Fortnite & Epic Games Unofficial API Documentation
233 stars 65 forks source link

GIfting issue #257

Closed someone6743 closed 5 months ago

someone6743 commented 5 months ago

When I try to gift and it can gift it has the vbucks and the 2 days so its allowed to gift but when I do it on the api I get this error

{'errorCode': 'errors.com.epicgames.modules.gamesubcatalog.catalog_out_of_date', 'errorMessage': 'Could not find null-MtxCurrency price for catalog item v2:/5e09b7a3a01447b4e39c43c5d85c0ded671a5c5246c7d7ef891fcbf8fd2d5f68', 'messageVars': ['null', 'MtxCurrency', 'v2:/5e09b7a3a01447b4e39c43c5d85c0ded671a5c5246c7d7ef891fcbf8fd2d5f68'], 'numericErrorCode': 28001, 'originatingService': 'fortnite', 'intent': 'prod-live'}

Krowe-moh commented 5 months ago

you're trying to gift a offer that's out of the item shop and MtxCurrency doesn't have the amount of vbucks to spend

someone6743 commented 5 months ago

It’s in the item shop and I got the vbucks

LeleDerGrasshalmi commented 5 months ago

Send payload, bust based on the error you entered mtxcurrency in the sub currency field and "null" into the currency field

someone6743 commented 5 months ago

p = { "offerId": "v2:/5e09b7a3a01447b4e39c43c5d85c0ded671a5c5246c7d7ef891fcbf8fd2d5f68", "purchaseQuantity": 1, "currency": "MtxCurrency", "currencySubType": "MtxCurrency", "expectedTotalPrice": 800, "receiverAccountIds": ["b784c33b0c874146b7e9902a1166924"], "giftWrapTemplateId": "", "personalMessage": "" }

i put this as the payload and im getting this error

{'errorCode': 'errors.com.epicgames.modules.gamesubcatalog.catalog_out_of_date', 'errorMessage': 'Could not find MtxCurrency-MtxCurrency price for catalog item v2:/5e09b7a3a01447b4e39c43c5d85c0ded671a5c5246c7d7ef891fcbf8fd2d5f68', 'messageVars': ['MtxCurrency', 'MtxCurrency', 'v2:/5e09b7a3a01447b4e39c43c5d85c0ded671a5c5246c7d7ef891fcbf8fd2d5f68'], 'numericErrorCode': 28001, 'originatingService': 'fortnite', 'intent': 'prod-live'}

LeleDerGrasshalmi commented 5 months ago

That's because you don't follow the documentation!

It following it says is important for this issue

{
    "currency": "", // From offer
    "currencySubType": "", // From offer
}
someone6743 commented 5 months ago

And what do I put in currency

LeleDerGrasshalmi commented 5 months ago

As the notes say, you put exactly what the offer config has

someone6743 commented 5 months ago

Ok I also have a question how do I keep the same acc access token because everytime it changes can you give me a docs to look at to keep the access token for longer?

LeleDerGrasshalmi commented 5 months ago

an access token expires, authentication for the fortnite clients expires after 2 hours (refresh after 8h)

someone6743 commented 5 months ago

Yes i got it to work thank you!