Skip to content

Conversation

joshdholtz
Copy link
Member

@joshdholtz joshdholtz commented Jul 22, 2021

Motivation and Context

Fixes #19124

Description

  • Endpoint ra/v1/session/webSession no longer exists for switching teams
  • Need to use new https://appstoreconnect.apple.com/olympus/v1/providerSwitchRequests endpoint
    • This endpoint doesn't take the team "team id" that was previously being used
    • The id that is now required is referred to as the "public provider id" which is a UUID
    • This can still (for now) be fetched from the /WebObjects/iTunesConnect.woa/ra/user/detail but uses contentProviderPublicId instead of contentProviderId

Testing Steps

  • Update Gemfile to 👇 and run bundle install, bundle update fastlane, or bundle update
gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "joshdholtz-new-team-switching-endpoint"

Copy link
Member

@crazymanish crazymanish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for me, thank you 🚀

@timshadel
Copy link

@joshdholtz This example now works with your change, when it was broken before. 👍

$ bundle exec irb
irb(main):001:0> require 'spaceship'
=> true
irb(main):002:0> Spaceship::Tunes.login(ENV['APPLE_ID'],ENV['FASTLANE_PASSWORD'])
irb(main):003:0> Spaceship::Tunes.select_team
Multiple App Store Connect teams found, please enter the number of the team you want to use: 
Note: to automatically choose the team, provide either the App Store Connect Team ID, or the Team Name in your fastlane/Appfile:
Alternatively you can pass the team name or team ID using the `FASTLANE_ITC_TEAM_ID` or `FASTLANE_ITC_TEAM_NAME` environment variable

  itc_team_id "99999999"

or

  itc_team_name "Example Inc."

1) "Blah Inc." (9999999998)
2) "Example Inc." (999999999)
2
=> "999999999"
irb(main):004:0> 

Copy link

@btuck044 btuck044 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@addbrick addbrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Confirmed working for my 130+ teams account.

@joshdholtz joshdholtz merged commit b62b37d into master Jul 22, 2021
Copy link

@fastlane-bot fastlane-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations! 🎉 This was released as part of fastlane 2.188.0 🚀

idcuesta pushed a commit to phorest/fastlane that referenced this pull request Jul 23, 2021
@fastlane fastlane locked and limited conversation to collaborators Sep 22, 2021
@lacostej lacostej deleted the joshdholtz-new-team-switching-endpoint branch November 24, 2023 14:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[spaceship] Not Found error on all actions/spaceship depending on ITC login to set team id due to change on Apple
6 participants