将应用程序添加到个人范围后,将其添加到团队范围
代码示例:
// Get the team ID for the team you want to add the app to $team_id = "TEAM_ID_GOES_HERE";
// Get the app ID for the app that was added to the personal scope $app_id = "APP_ID_GOES_HERE";
// Call the App Store Connect API to add the app to the team scope $endpoint = "https://api.appstoreconnect.apple.com/v1/apps/{$app_id}/relationships/parentBundleId"; $data = array( "data" => array( "id" => $team_id, "type" => "groups" ) ); $options = array( "http" => array( "method" => "POST", "header" => "Authorization: Bearer ACCESS_TOKEN_GOES_HERE\r\n" . "Content-Type: application/json\r\n", "content" => json_encode($data) ) ); $context = stream_context_create($options); $result = file_get_contents($endpoint, false, $context);