{"id":21389376,"url":"https://github.com/isaced/appstore-connect-sdk","last_synced_at":"2025-08-24T22:38:28.336Z","repository":{"id":65929156,"uuid":"602358662","full_name":"isaced/appstore-connect-sdk","owner":"isaced","description":"A TypeScript module for Node.js that interacts with the App Store Connect API, providing support for all APIs based on OpenAPI specification.","archived":false,"fork":false,"pushed_at":"2024-03-17T00:39:15.000Z","size":1045,"stargazers_count":17,"open_issues_count":5,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-01T12:59:16.418Z","etag":null,"topics":["appstore","appstoreconnect","appstoreconnect-api","openapi"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isaced.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"isaced"}},"created_at":"2023-02-16T03:10:48.000Z","updated_at":"2024-07-10T09:38:25.425Z","dependencies_parsed_at":"2024-07-10T09:50:29.240Z","dependency_job_id":null,"html_url":"https://github.com/isaced/appstore-connect-sdk","commit_stats":{"total_commits":51,"total_committers":1,"mean_commits":51.0,"dds":0.0,"last_synced_commit":"2616cd7c525e643a08f42731d1cf89576c7c1108"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaced%2Fappstore-connect-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaced%2Fappstore-connect-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaced%2Fappstore-connect-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaced%2Fappstore-connect-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isaced","download_url":"https://codeload.github.com/isaced/appstore-connect-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225896418,"owners_count":17541491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appstore","appstoreconnect","appstoreconnect-api","openapi"],"created_at":"2024-11-22T12:26:10.894Z","updated_at":"2025-08-24T22:38:28.309Z","avatar_url":"https://github.com/isaced.png","language":"TypeScript","funding_links":["https://github.com/sponsors/isaced"],"categories":[],"sub_categories":[],"readme":"# appstore-connect-sdk [![@latest](https://img.shields.io/npm/v/appstore-connect-sdk.svg)](https://www.npmjs.com/package/appstore-connect-sdk)\n\nThe `appstore-connect-sdk` is a Node.js module written in TypeScript that provides a convenient way for developers to interact with the [App Store Connect API](https://developer.apple.com/app-store-connect/api/). The module is built on top of the [OpenAPI Generator](https://openapi-generator.tech/) tool and provides support for all APIs based on OpenAPI specification.\n\nEnglish | [简体中文](https://github.com/isaced/appstore-connect-sdk/blob/main/README_zh.md)\n\n## Kickstart information on the API\n\n- [Automate your workflow with the App Store Connect API](https://developer.apple.com/app-store-connect/api/)\n- [App Store Connect API Official Documentation](https://developer.apple.com/documentation/appstoreconnectapi)\n- [WWDC 2018 303 - Automating App Store Connect](https://developer.apple.com/videos/play/wwdc2018/303/) (Video)\n\n## Included in this SDK\n\nThe `appstore-connect-sdk` module includes the following features:\n\n- [x] Configuration with API Key and JWT Logic to sign requests\n- [x] Support for custom network libraries for making requests, such as fetch/node-fetch/axios...\n- [x] Support for _all_ requests due to OpenAPI generated requests and entities\n- [x] Compatibility with both Node.js and **Deno** environments\n\n## Examples\n\n- [Deno Example](https://github.com/isaced/appstore-connect-sdk/tree/main/deno_example)\n- [Node Example](https://github.com/isaced/appstore-connect-sdk/tree/main/node_example)\n\n## Installation\n\n```bash\nnpm install appstore-connect-sdk\n```\n\n## Usage\n\n#### 1. Import `appstore-connect-sdk`\n\n```typescript\nimport { AppStoreConnectAPI } from \"appstore-connect-sdk\";\n```\n\n#### 2. Create your API Configuration\n\nGo to [App Store Connect -\u003e Users and Access -\u003e Keys](https://appstoreconnect.apple.com/access/api) and create your own key. This is also the page to find your `private key ID` and the `issuer ID`.\n\nThe SDK supports both **Team API Keys** and **Individual API Keys**:\n\n- **Team API Keys**: Used by teams, requires `issuerId`\n- **Individual API Keys**: Used by individual developers, `issuerId` is not required\n\nAfter downloading your private key, open the `.p8` file containing the private key in a text editor. It should look like this:\n\n```\n-----BEGIN PRIVATE KEY-----\nAIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgKEn1VBakCdHIEcdS\naBWr/9laASzaAbF2LP7wTYjHK52gCgYIKoZIzj0DAQehRANCAAQ/jf2sxRvXEhjn\nsrw8kJcHvO0dQ1KmUlxZvATsFsjJbdQ1yAENAWItUoeTV0rhdajcdOQxKl1OPse0\nnNdXXbA4\n-----END PRIVATE KEY-----\n```\n\n**For Team API Keys:**\n\n```typescript\nconst client = new AppStoreConnectAPI({\n  issuerId: \"\u003cYOUR ISSUER ID\u003e\",\n  privateKeyId: \"\u003cYOUR PRIVATE KEY ID\u003e\",\n  privateKey: \"\u003cYOUR PRIVATE KEY\u003e\",\n});\n```\n\n**For Individual API Keys:**\n\n```typescript\nconst client = new AppStoreConnectAPI({\n  // No issuerId required for Individual API Keys\n  privateKeyId: \"\u003cYOUR PRIVATE KEY ID\u003e\",\n  privateKey: \"\u003cYOUR PRIVATE KEY\u003e\",\n});\n```\n\nFor more information on how JWT works with the App Store Connect API, check out Apple's authentication guides:\n\n- [Creating API Keys for App Store Connect API](https://developer.apple.com/documentation/appstoreconnectapi/creating_api_keys_for_app_store_connect_api)\n- [Generating Tokens for API Requests](https://developer.apple.com/documentation/appstoreconnectapi/generating_tokens_for_api_requests)\n- [Revoking API Keys](https://developer.apple.com/documentation/appstoreconnectapi/revoking_api_keys)\n\n#### 3. Create an API and perform a request\n\nYou can find all available APIs in [src/openapi/apis](https://github.com/isaced/appstore-connect-sdk/tree/main/src/openapi/apis), these classes are generated according to [App Store Connect API - OpenAPI specification](https://developer.apple.com/sample-code/app-store-connect/app-store-connect-openapi-specification.zip), If you encounter any problems, please open an [issue](https://github.com/isaced/appstore-connect-sdk/issues).\n\n```typescript\nconst api = await client.create(AppsApi);\nconst res = await api.appsGetCollection();\nconsole.log(res);\n```\n\nHere's the complete code example:\n\n**For Team API Keys:**\n\n```typescript\nimport { AppStoreConnectAPI } from \"appstore-connect-sdk\";\nimport {\n  AppsApi,\n  AppEventLocalizationsApi,\n} from \"appstore-connect-sdk/openapi\";\n\nconst client = new AppStoreConnectAPI({\n  issuerId: \"\u003cYOUR ISSUER ID\u003e\",\n  privateKeyId: \"\u003cYOUR PRIVATE KEY ID\u003e\",\n  privateKey: \"\u003cYOUR PRIVATE KEY\u003e\",\n});\n\nconst api = await client.create(AppsApi);\nconst res = await api.appsGetCollection();\nconsole.log(res);\n```\n\n**For Individual API Keys:**\n\n```typescript\nimport { AppStoreConnectAPI } from \"appstore-connect-sdk\";\nimport {\n  AppsApi,\n  AppEventLocalizationsApi,\n} from \"appstore-connect-sdk/openapi\";\n\nconst client = new AppStoreConnectAPI({\n  // No issuerId for Individual API Keys\n  privateKeyId: \"\u003cYOUR PRIVATE KEY ID\u003e\",\n  privateKey: \"\u003cYOUR PRIVATE KEY\u003e\",\n});\n\nconst api = await client.create(AppsApi);\nconst res = await api.appsGetCollection();\nconsole.log(res);\n```\n\n### Custom network libraries\n\nBy default, AppStoreConnectAPI uses its built-in `fetch` function for HTTP requests. Note that this function requires Node.js version **18.0.0** or higher.\n\nHowever, you can also configure any network library that adheres to the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/fetch) standard specification by setting the `fetchApi` option in the AppStoreConnectAPI constructor.\n\n```typescript\nimport { AppStoreConnectAPI } from \"appstore-connect-sdk\";\nimport fetch from \"node-fetch\";\n\nnew AppStoreConnectAPI({\n  // ...\n  fetchApi: fetch as unknown as FetchAPI, // All network requests are made via node-fetch\n});\n```\n\n### Overriding the base URL\n\nFor integration testing purposes, you can override the base path of the App Store Connect API by setting the `basePath` option in the AppStoreConnectAPI constructor. For example, you can use this to point to a local mock server. This allows you to test the behavior of your application in a more controlled environment without making requests to the real API.\n\n```typescript\nimport { AppStoreConnectAPI } from \"appstore-connect-sdk\";\n\nnew AppStoreConnectAPI({\n  // ...\n  basePath: \"http://localhost:3000\", // All network requests are made to http://localhost:3000\n});\n```\n\n## Updating OpenAPI generated code\n\nTo update the OpenAPI-generated code, run the following command:\n\n```bash\n$ sh gen-openapi.sh\n```\n\nThis will generate Typescript code through [OpenAPI Generator](https://openapi-generator.tech/) based on the [OpenAPI specification](https://github.com/isaced/appstore-connect-sdk/blob/fdabb5bb414e9e3c02341ac1fa3238a5bfa15c30/app_store_connect_api_2.2_openapi.json) file officially released by Apple.\n\n## Deno Compatibility\n\nThe `appstore-connect-sdk` module is fully compatible with Deno, An example of using the `appstore-connect-sdk` module in a Deno environment can be found in the [deno_example](https://github.com/isaced/appstore-connect-sdk/tree/main/deno_example).\n\nWe are committed to ensuring that the `appstore-connect-sdk` module remains fully compatible with both Node.js and Deno, and we will continue to work on improving its compatibility with Deno as the Deno runtime evolves.\n\n## License\n\n**appstore-connect-sdk** is available under the MIT license, and uses source code from open source projects. See the [LICENSE](https://github.com/isaced/appstore-connect-sdk/blob/main/LICENSE) file for more information.\n\n## Author\n\nThis project was originally created by [isaced](https://github.com/isaced) but has had many [great contributors](https://github.com/isaced/appstore-connect-sdk/graphs/contributors). We're open to contributions of any kind to make this project even better.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaced%2Fappstore-connect-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisaced%2Fappstore-connect-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaced%2Fappstore-connect-sdk/lists"}