App Store Connect Create a Profile Errors 500

I am going to generate a profile but the server returns 500 and there are no hints available.😢


I have no problem with other functions, but when I created the profile, this problem occurred. How should I solve this problem? I sent the email to the apple, but I didn't get a reply.😐


So is the parameter error causing the server to return 500, or the Apple server has some problems?


So is it a parameter error that causes the server to return 500, or is there a problem with the Apple server? Because I didn't find the relevant sample code, I was unable to determine what caused the problem.


URL:https://developer.apple.com/documentation/appstoreconnectapi/create_a_profile

POST https://api.appstoreconnect.apple.com/v1/profiles

python code:

def registerProfile(token, identifier, udid, certificateID):
data = dict(
     data=dict(
          type='profiles',
          attributes=dict(
                 name='helloworld_ADHoc',
                 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 code

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

Replies

Maybe it's a server problem. I received the same error. Have you solved this? If not, the apple is too derelict

same problem as me 😢

I was getting the same error today.


I just noticed that data parameter in Certificates and Devices has to be an array.


data = dict(  
  data=dict(  
  type='profiles',  
  attributes=dict(  
  name='helloworld_ADHoc',  
  profileType='IOS_APP_ADHOC'  
  ),  
  relationships=dict(  
  bundleId=dict(  
  data=dict(  
  type='bundleIds',  
  id='xd'  
  )  
  ),  
  certificates=dict(  
  data=[dict(  
  type='certificates',  
  id='certificateID'  
  )]  
  ),  
  devices=dict(  
  data=[dict(  
  type='devices',  
  id='ID from v1/devices'  
  )]  
  )  
  )  
  )  
  ) 


If you know how to save the profileContent to mobileprofile file i will apreciated any help. I'm getting this error


Profile is missing the required UUID property.

this is usefull, i sovled the 500 error , but only the devices attr id is not udid , it's the id get by list device api

Hello Bebe Ulrica,

Are you still facing an issue with this? What specifically are you trying to solve for currently?


Thanks!

You are right, needs the id from v1/devices