FAQ
I’ve provided all the required parameters but I still got a 403 error.
Please check if a special User Agent has been included in the request’s header.
With secondary checks enabled, does the game need to send two separate requests to the redemption system?
No. With secondary checks enabled, the redemption system will send requests to the interface you configured on the Developer Center.
Unable to parse the content parameter of the serverless return value?
The content in the return value is a nested JSON string. You can first read the string and then perform further JSON parsing. In addition, a new content_obj field has been added, which you can use selectively.
How to determine if the exchange is successful?
You can judge by whether the error field in the return value is 0.
How to use the sign field in serverless exchange?
Please refer to the signature section in the documentation.
Unity request for serverless exchange interface reports error HTTP/1.1 422 Unprocessable Entity
Please check if the event switch is turned on and if the gift code has expired in Developer Console -> Gift Package Service.
Error when generating gift package, time cannot exceed 2040
The current maximum gift package time is 2038-01-19 11:14:07 .
What's the difference between the three methods for redeeming gift codes?
Method | Interfaces neded | Features |
---|---|---|
Verified by game | Redeeming, secondary checks, and delivering items | You must maintain interfaces for both secondary checks and item delivery. Your game will check if conditions are met to deliver gifts. The logic for checking conditions and delivering gifts can be maintained separately. |
Requested by game | Redeeming and delivering items | You only need to maintain one interface for item delivery. The interface can be used to check conditions and deliver items. |
Redeeming without a server | Redeeming | Our service will check if the code is valid and the number of items remaining. The item information is returned as long as the code is valid. This provides a simpler workflow and you don't have to maintain your own interfaces. |
The gift redemption interface returns the exception {"error":100016,"message":"该礼包码无效码","info":{"dev_message":"invalid code","hint":"gift code is invalid"}}
Check if the gift code passed into the interface is wrong. The gift code can be exported in Developer Center > Your Game > Operational Tools > Gifts > Gift Event > Data > Export. After clicking the Export
button, a .csv
file will be generated, and you can check the gift code in that file.
The sent by game
gift redemption interface returns the exception {"error":100015,"message":"发送道具失败"}
This exception indicates that the parameters passed when calling the interface are correct, and the signing is also correct, but the interface for sending items on the server side of the game may not be working. The game developer should check if there are any issues with the interface for sending items.