Ios 应用商店连接创建配置文件错误500

Ios 应用商店连接创建配置文件错误500,ios,app-store-connect,Ios,App Store Connect,我将生成一个配置文件,但服务器返回500,并且没有可用的提示 我对其他函数没有问题,但是当我创建概要文件时,出现了这个问题。我应该如何解决这个问题?我给苹果发了邮件,但没有得到回复 那么,是参数错误导致服务器返回500,还是苹果服务器出现了一些问题 那么,是参数错误导致服务器返回500,还是苹果服务器有问题?因为我没有找到相关的示例代码,所以无法确定问题的原因 HTTP请求: POST https://api.appstoreconnect.apple.com/v1/profiles pyt

我将生成一个配置文件,但服务器返回500,并且没有可用的提示

我对其他函数没有问题,但是当我创建概要文件时,出现了这个问题。我应该如何解决这个问题?我给苹果发了邮件,但没有得到回复

那么,是参数错误导致服务器返回500,还是苹果服务器出现了一些问题

那么,是参数错误导致服务器返回500,还是苹果服务器有问题?因为我没有找到相关的示例代码,所以无法确定问题的原因

HTTP请求:

POST https://api.appstoreconnect.apple.com/v1/profiles
python代码:

def registerProfile(token, identifier, udid, certificateID):  
    data = dict(  
        data=dict(  
            type='profiles',  
            attributes=dict(  
                name='xxxxx',  
                profileType='IOS_APP_ADHOC'  
            ),  
            relationships=dict(  
                bundleId=dict(  
                    data=dict(  
                        type='bundleIds',  
                        id=identifier  
                    )  
                ),  
                certificates=dict(  
                    data=dict(            
                        type='certificates',  
                        id=certificateID  
                    )
                ),
                devices=dict(  
                    data=dict(  
                        type='devices',  
                        id=udid  
                    )  
                )  
            )  
        )  
    )  
    result = requestUtils.post(token, URL.registerProfile, data)  
    print(result.text)  
    try:  
        id = json.loads(result.content.decode())['data']['id']  
    except BaseException:  
        return False  
    return id
错误响应:

{  
    "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/."  
    }]]
}

关系对象中,字段certificates.datadevices.data应该是数组,而您已经定义了字典

有关字段,请分别参阅相关文档页:

因此,应作出以下修改:

 certificates=dict(  
                data=[dict(            
                    type='certificates',  
                    id=certificateID  
                )]
            ),
            devices=dict(  
                data=[dict(  
                    type='devices',  
                    id=udid  
                )]
            )  

不幸的是,API没有返回更好的错误响应,而只是产生一个服务器错误。但是,如果请求资源id和头是正确的,这些更改应该会产生正确的响应(我遇到了与您相同的问题,这就是问题的原因)。

关系对象中,字段证书。数据设备。数据应该是数组,而你已经定义了字典

有关字段,请分别参阅相关文档页:

因此,应作出以下修改:

 certificates=dict(  
                data=[dict(            
                    type='certificates',  
                    id=certificateID  
                )]
            ),
            devices=dict(  
                data=[dict(  
                    type='devices',  
                    id=udid  
                )]
            )  

不幸的是,API没有返回更好的错误响应,而只是产生一个服务器错误。但是,只要请求资源id和头是正确的,这些更改应该会产生正确的响应(我遇到了与您相同的问题,这就是问题的原因)。

为什么要这样定义DICT?为什么不使用
{}
?这对我来说更方便查看您为什么这样定义dict?为什么不使用
{}
?这对我来说更方便查看