iosiosdeploymentapp-store-connect-api

I am getting "There is no app id with id "bundle.identifer.app" on this team" while trying to create provisioning profile using app store connect api


I tried creating a provisioning profile through App Store Connect API. Here is the body with obfuscated data that I sent to POST v1/profiles.

{
  "data": {
    "relationships": {
      "certificates": {
        "data": [
          {
            "id": "BD615443",
            "type": "certificates"
          }        ]
      },
      "bundleId": {
        "data": {
          "id": "bundle.identifier.app",
          "type": "bundleIds"
        }
      }
    },
    "attributes": {
      "profileType": "IOS_APP_STORE",
      "name": "SO Question Profile"
    },
    "type": "profiles"
  }
}

I cross verified that all the above supplied data was correct. But I ended up receiving an error response with error description - There is no App ID with ID 'com.appmysite.iaptest' on this team.

I can see that I have not made a mistake while copying and pasting the bundle ID from developer.apple.com. I have also tried the app ID (teamID.bundle.identifier.app) and also the app Apple ID (1234567) for this API field and nothing seems to work. Moreover, I am able to create a provisioning profile using the same certificate and bundle ID through App Store Connect portal. There is little to no documentation and online resources regarding this, so what exactly does Apple expect me to send as bundleId?


Solution

  • So, since I was sending the primaryID of the certificate that I want to use to create the provisioning profile. I thought of trying the same for the bundleID and it worked like a charm.

    It is important to note that these 'primaryIds' are not exposed through App Store Connect portal and needs to be obtained using App Store Connect APIs.

    For certificates you can use GET v1/certificates and for bundleIds use GET v1/bundleIds.