Getting the error shown below while trying to execute the post/upload/data (step 3) request. Do you know why I am getting this error? Step 1 and 2 work as expected. Have i put some wrong information in "postData"?
My request body:
{
"postData": {
"resize": false,
"late": true,
"visibility": "friends",
"retakes": 0,
"caption": "Hello",
"taken_at": "2024-01-14T16:14:51.123Z",
"location": "[48.864716, 2.349014]"
},
"tokenData": "here is my postDataToken"
}
This is what the server responses:
{
"status": 500,
"message": "Internal server error",
"data": {
"response": {
"status": 400,
"message": "Post not created",
"data": {
"done": false,
"msg": {
"message": "Request failed with status code 400",
"name": "AxiosError",
"stack": "AxiosError: Request failed with status code 400\n at settle (/app/node_modules/axios/dist/node/axios.cjs:1970:12)\n at IncomingMessage.handleStreamEnd (/app/node_modules/axios/dist/node/axios.cjs:3069:11)\n at IncomingMessage.emit (node:events:531:35)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)",
"config": {
"transitional": {
"silentJSONParsing": true,
"forcedJSONParsing": true,
"clarifyTimeoutError": false
},
"adapter": [
"xhr",
"http"
],
"transformRequest": [
null
],
"transformResponse": [
null
],
"timeout": 0,
"xsrfCookieName": "XSRF-TOKEN",
"xsrfHeaderName": "X-XSRF-TOKEN",
"maxContentLength": -1,
"maxBodyLength": -1,
"env": {},
"headers": {
"Accept": "application/json, text/plain, /",
"Content-Type": "application/json",
"Authorization": "Bearer censored",
"user-agent": "BeReal/1.0.1 (AlexisBarreyat.BeReal; build:9513; iOS 16.0.2) 1.0.0/BRApriKit",
"x-ios-bundle-identifier": "AlexisBarreyat.BeReal",
"Content-Length": "442",
"Accept-Encoding": "gzip, compress, deflate, br"
},
"method": "post",
"url": "https://mobile.bereal.com/api/content/posts",
"data": "{"isLate":true,"retakeCounter":0,"takenAt":"2024-01-14T16:14:51.123[Z]","caption":"Hello","visibility":["friends"],"backCamera":{"bucket":"storage.bere.al","height":2000,"width":1500,"path":"Photos/censored/post/censored.webp"},"frontCamera":{"bucket":"storage.bere.al","height":2000,"width":1500,"path":"Photos/censored/post/censored.webp"},"location":{"latitude":"[","longitude":"4"}}"
},
"code": "ERR_BAD_REQUEST",
"status": 400
}
}
},
"status": 400,
"message": "Post not created",
"name": "HttpException"
}
}
I replaced private stuff with "censored".