Hi,
I am using Node.js for updating my game achievements. Also not sure what is the recommended programming language to use for this.
I will want to add Achievement Localization to my existing achievement.
I was following the document here: https://developer.apple.com/documentation/appstoreconnectapi/post-v1-gamecenterachievementlocalizations
const postData = {
type: "gameCenterAchievementLocalizations",
attributes: {
locale: "it-IT",
name: "XXXXXXXXXXX",
afterEarnedDescription: "XXXXXXXXXXXXXX",
beforeEarnedDescription: "XXXXXXXXXXXXXXXXXXXXXXXX"
},
relationships: {
gameCenterAchievement: {
data: {
type: "gameCenterAchievement",
id: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
}
}
}
};
let axiosConfig = {
headers:{
Authorization: `Bearer ${token}` }
};
const response = axios.post('https://api.appstoreconnect.apple.com/v1/gameCenterAchievementLocalizations', postData, axiosConfig);
After I run the above code, it throw me an error 422.
status: '422',
code: 'ENTITY_UNPROCESSABLE',
title: 'The request entity is not a valid request document object',
detail: "Unexpected or invalid value at 'type'.",
meta: { position: [Object] }
Any idea what went wrong with my code?
Thank you