How to get iTunes connect Team ID and Team name?

If you are not on your Mac, you can get it through the iTunes connect website.

  • Login to App Store Connect (https://appstoreconnect.apple.com/)
  • Get output (JSON) from (https://appstoreconnect.apple.com/WebObjects/iTunesConnect.woa/ra/user/detail)
  • You can now get your iTunes Connect ids from the associatedAccounts array with the different contentProvider objects - the entry named contentProviderId reflects the iTunes Connect id, lookup for the name value to pick the correct one

Source: https://github.com/fastlane/fastlane/issues/4301#issuecomment-253461017


You can get it directly from Spaceship (See the "Login" section) (https://github.com/fastlane/fastlane/blob/master/spaceship/docs/iTunesConnect.md)

Basically just type the following in a shell:

$ irb
irb> require "spaceship"
irb> Spaceship::Tunes.login("iTunesConnect_username", "iTunesConnect_password")
irb> Spaceship::Tunes.select_team

You'll be presented with a list of teams your account belongs to, along with the numerical representation for that team.