ios 返回403资源“Thesearchers”不允许使用“CREATE”,允许的操作包括:GET_COLLECTION”

qoefvg9y  于 2023-05-19  发布在  iOS
关注(0)|答案(1)|浏览(92)

尝试从apple connect API中提取财务报告并获得403 for CREATE操作,这没有记录:/。有谁知道我如何使用GET_COLLECTIONS操作在这里与cURL?

exec("curl -v -X POST -H 'Authorization: Bearer {$token}' \"https://api.appstoreconnect.apple.com/v1/financeReports\" -d 'regionCode=Americas&reportDate=2020-01&reportType=FINANCIAL&vendorNumber=xxx&' -o output");

回复:

{
  "errors" : [ {
    "id" : "bb9e260c-c3d4-4df9-b78e-f34dfd42c449",
    "status" : "403",
    "code" : "FORBIDDEN_ERROR",
    "title" : "The given operation is not allowed",
    "detail" : "The resource 'financeReports' does not allow 'CREATE'. Allowed operations are: GET_COLLECTION"
  } ]
}

[回应][1] [1]:https://i.stack.imgur.com/X3dcv.png

jc3wubiy

jc3wubiy1#

您需要使用GET,而不是POST

exec("curl -v X GET -H 'Authorization: Bearer {$token}' \"https://api.appstoreconnect.apple.com/v1/financeReports?regionCode=Americas&reportDate=2020-01&reportType=FINANCIAL&vendorNumber=xxx\" -o output");

应该可以了

相关问题