App update problem with Galaxy store Developer API in python

Hello,

I’ve gotten app details with Galaxy store developer API and tried to update them with a new APK in python, but I got the following error message.

{“from”:“seller”,“body”:{“ctntId”:“00000XXXXXXX”,“contentStatus”:“REGISTERING”,“httpStatus”:“BAD_REQUEST”,“errorCode”:“5021”,“errorMsg”:“This binary is already in use.”},“message”:“Request failed with status code 400”}

I think it is from the incorrect configuration code for this part of the json.
which part should we use old apk’s information, which should be applied new apk’s information?

payload = json.dumps({
“contentId”: strCID,
“defaultLanguageCode”: “ENG”,
“paid”: “N”,
“usExportLaws”: True,
“binaryList”: [
{
“fileName”: fileName,
“binarySeq”: parm_oldInfo[‘binarySeq’],
“versionCode”: ‘1’,
“versionName”: parm_oldInfo[“versionName”],
“packageName”: apk[“packname”],
“nativePlatforms”: None,
“apiminSdkVersion”: “9”,
“apimaxSdkVersion”: None,
“iapSdk”: “N”,
“gms”: “N”,
“filekey”: None
},
{
“gms”: “N”,
“filekey”: fileKey
}
]
})

Thanks in advance.

Hello,
Welcome to this forum.

The error seems not common. I am not sure what parameter value is not correct, but generally binarySeq, filekey, versionCode these parameters make errors. Can you check this blog?

Hopefully you have read this document Content Publish API Reference | Samsung Developers, if you miss this. For binarySeq parameter “Copy the value from the contentInfo response. This value is not visible in Seller Portal.”

Please let me know your update.

Thanks for your reply.

I’ve already read and reviewed the links you provided. Despite attempting multiple parameter changes, I haven’t been able to pinpoint the solution yet.
If anyone is familiar with the solution, please share it with me.

Thanks in advance.