Create an App Store Connect app via iris API using web session from Blitz
Create an App Store Connect app using Apple's iris API. Authentication is handled via a web session file at ~/.blitz/asc-agent/web-session.json managed by Blitz.
Extract from the conversation context:
bundleId — the bundle identifier (e.g. com.blitz.myapp)sku — the SKU string (may be provided; if missing, generate one from the app name)test -f ~/.blitz/asc-agent/web-session.json && echo "SESSION_EXISTS" || echo "NO_SESSION"
NO_SESSION: call the asc_web_auth MCP tool first. Wait for it to complete before proceeding.SESSION_EXISTS: proceed.Ask what primary language/locale the app should use. Common choices: (English US), (English UK), (Japanese), (Simplified Chinese), (Korean), (French), (German).
en-USen-GBjazh-Hanskofr-FRde-DETake the last component of the bundle ID after the final ., capitalize the first letter. Confirm with the user.
Use the following self-contained script. Replace BUNDLE_ID, SKU, APP_NAME, and LOCALE with the resolved values. Do not print or log cookies.
Key differences from the public REST API:
appstoreconnect.apple.com/iris/v1/ (not api.appstoreconnect.apple.com)appInfos relationship (not bundleId relationship)appInfoLocalizations (not appStoreVersionLocalizations)${new-...} placeholder IDs for inline-created resourcespython3 -c "
import json, os, urllib.request, sys
BUNDLE_ID = 'BUNDLE_ID_HERE'
SKU = 'SKU_HERE'
APP_NAME = 'APP_NAME_HERE'
LOCALE = 'LOCALE_HERE'
session_path = os.path.expanduser('~/.blitz/asc-agent/web-session.json')
if not os.path.isfile(session_path):
print('ERROR: No web session found. Call asc_web_auth MCP tool first.')
sys.exit(1)
with open(session_path) as f:
raw = f.read()
store = json.loads(raw)
session = store['sessions'][store['last_key']]
cookie_str = '; '.join(
(f'{c[\"name\"]}=\"{c[\"value\"]}\"' if c['name'].startswith('DES') else f'{c[\"name\"]}={c[\"value\"]}')
for cl in session['cookies'].values() for c in cl
if c.get('name') and c.get('value')
)
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Origin': 'https://appstoreconnect.apple.com',
'Referer': 'https://appstoreconnect.apple.com/',
'Cookie': cookie_str
}
create_body = json.dumps({
'data': {
'type': 'apps',
'attributes': {
'bundleId': BUNDLE_ID,
'sku': SKU,
'primaryLocale': LOCALE,
},
'relationships': {
'appStoreVersions': {
'data': [{'type': 'appStoreVersions', 'id': '\${new-appStoreVersion-1}'}]
},
'appInfos': {
'data': [{'type': 'appInfos', 'id': '\${new-appInfo-1}'}]
}
}
},
'included': [
{
'type': 'appStoreVersions',
'id': '\${new-appStoreVersion-1}',
'attributes': {'platform': 'IOS', 'versionString': '1.0'},
'relationships': {
'appStoreVersionLocalizations': {
'data': [{'type': 'appStoreVersionLocalizations', 'id': '\${new-appStoreVersionLocalization-1}'}]
}
}
},
{
'type': 'appStoreVersionLocalizations',
'id': '\${new-appStoreVersionLocalization-1}',
'attributes': {'locale': LOCALE}
},
{
'type': 'appInfos',
'id': '\${new-appInfo-1}',
'relationships': {
'appInfoLocalizations': {
'data': [{'type': 'appInfoLocalizations', 'id': '\${new-appInfoLocalization-1}'}]
}
}
},
{
'type': 'appInfoLocalizations',
'id': '\${new-appInfoLocalization-1}',
'attributes': {'locale': LOCALE, 'name': APP_NAME}
}
]
}).encode()
req = urllib.request.Request(
'https://appstoreconnect.apple.com/iris/v1/apps',
data=create_body, method='POST', headers=headers)