Appstore Connect创建配置文件api不起作用

时间:2019-09-08 11:22:05

标签: ios app-store-connect apple-developer

我使用Appstore Connect API。我使用了create profile api,但出现500错误(https://developer.apple.com/documentation/appstoreconnectapi/create_a_profile)。我检查了所有字段,它们是正确的。我还联系了苹果,但他们没有回来。

请求:[POST]:https://api.appstoreconnect.apple.com/v1/profiles

身体数据:

{
    "data": {
        "attributes": {
            "name": "xxx",
            "profileType": "IOS_APP_STORE"
        },
        "relationships": {
            "bundleId": {
                "data": {
                    "id": "xxx",
                    "type": "bundleIds"
                }
            },
            "certificates": {
                "data": {
                    "id": "xxx",
                    "type": "certificates"
                }
            }
        },
        "type": "profiles"
    }
}

响应:

{
  errors: [
    {
      status: '500',
      code: 'UNEXPECTED_ERROR',
      title: 'An unexpected error occurred.',
      detail: 'An unexpected error occurred on the server side. If this issue ' +
        'continues, contact us at https://developer.apple.com/contact/.'
    }
  ]
}

1 个答案:

答案 0 :(得分:0)

已解决

证书数据必须为数组

"certificates": {
      "data": {
            "id": "xxx",
            "type": "certificates"
      }
 }

"certificates": {
      "data": [{
            "id": "xxx",
            "type": "certificates"
      }]
 }