appstore_invite_testers
Invite people to a TestFlight group by email and see, for each address, whether they were invited, added or refused.
Adds people to a TestFlight group by email. Apple emails each one an invitation once the group has a build. Someone who is already a tester of the app elsewhere is added to this group as they are. Internal groups accept only the Apple team’s own App Store Connect users; Apple refuses anyone else.
Each person is handled on their own, and the result says what happened to each. One exception: if Apple refuses to add someone who is already a tester of the app, the whole call fails, though people earlier in the list have already been invited.
| Read-only | Destructive | Idempotent |
|---|---|---|
| No | No | Yes |
Inputs
| Input | Type | Required | Default | What it does |
|---|---|---|---|---|
teamId |
string (UUID) | yes | — | The Team, from list_teams. |
projectId |
string (UUID) | this or appId |
— | The Project whose app this is, from list_projects: the usual way to name an app. The app is the one on App Store Connect with the bundle id the Project builds. When both are sent, projectId is used. |
appId |
string | this or projectId |
— | An App Store Connect app id from appstore_list_apps, for an app no Project builds. |
appleTeamId |
string (UUID) | no | every connected Apple team | One of the Team’s Apple teams, from appstore_list_apple_teams. With appId, only this Apple team is searched for the app. With projectId it is not needed: the Project’s app decides. |
group |
string | yes | — | The group’s name or groupId, from appstore_list_beta_groups. |
testers |
array of 1 to 50 objects | yes | — | The people to add. |
testers[].email |
string (email) | yes | — | Their email address. |
testers[].firstName |
string | no | — | Their first name. |
testers[].lastName |
string | no | — | Their last name. |
The checks every tool makes on its inputs are on Server and sign-in.
Result
A JSON object, as text and as structuredContent.
| Field | What |
|---|---|
group |
The group (fields as in appstore_list_beta_groups) |
testers[].email |
The address sent |
testers[].result |
invited (a new tester), added (an existing tester added to the group), or the sentence Apple refused this person with |
{
"group": {
"groupId": "00000000-0000-0000-0000-000000000000",
"name": "Friends",
"kind": "external",
"allBuilds": false,
"publicLink": "https://testflight.apple.com/join/XXXXXXXX",
"publicLinkLimit": 100,
"feedback": true
},
"testers": [
{
"email": "tester@example.com",
"result": "invited"
},
{
"email": "friend@example.com",
"result": "added"
}
]
}Errors
Each comes back as a tool error (isError: true). Italic words stand for the values in the sentence. The errors every tool can return are on Server and sign-in.
| Message | When | What to do |
|---|---|---|
| testers must list at least one email. | testers is empty or not a list |
Send at least one tester |
| No TestFlight group “group”. The app’s groups: names. | No group of the app has that name (case does not matter) or groupId. With no groups, the list reads “none — create one with appstore_create_beta_group” |
Use a name from the sentence or from appstore_list_beta_groups |
| Pass projectId, or appId from appstore_list_apps. | Neither projectId nor appId was sent |
Send one of them |
| This Project has not been built for iOS yet, so it has no bundle id to find its app by. Ask the Team’s Agent to build it, or pass appId. | The Project has never been built for iOS | Ask the Project’s Agent for an iOS build (send_message), or name the app by appId |
| This Project has no app on App Store Connect yet. Create one with appstore_create_app (its bundle id is the Project’s), or pass appId. | No app on the Team’s connected Apple teams has the Project’s bundle id, or no Apple team is connected | Create the app with appstore_create_app, or name another app by appId |
| No connected Apple team of this Team has that app. See appstore_list_apps. | appId is not an app of any connected Apple team (or of appleTeamId) |
Take the id from appstore_list_apps |
| App Store Connect: Apple’s sentence | Apple refused the request. Up to five of Apple’s own sentences follow, each with the field it is about in brackets when Apple names one. An Apple agreement waiting in App Store Connect is refused this way too | Act on Apple’s words. Agreements are accepted by the Apple Developer account’s Account Holder in App Store Connect (Business › Agreements) |
| App Store Connect answered status. Try again in a moment. | Apple refused without saying why | Try again in a moment |
Example
{
"name": "appstore_invite_testers",
"arguments": {
"teamId": "00000000-0000-0000-0000-000000000000",
"projectId": "00000000-0000-0000-0000-000000000000",
"group": "Friends",
"testers": [
{
"email": "tester@example.com",
"firstName": "Alex"
}
]
}
}