https://github.com/rageagainstthepixel/app-store-connect-api
A TypeScript package for communicating with Apple App Store Connect API
https://github.com/rageagainstthepixel/app-store-connect-api
api app app-store-connect-api apple connect node npm store
Last synced: over 1 year ago
JSON representation
A TypeScript package for communicating with Apple App Store Connect API
- Host: GitHub
- URL: https://github.com/rageagainstthepixel/app-store-connect-api
- Owner: RageAgainstThePixel
- License: mit
- Created: 2024-10-12T01:37:57.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-16T02:01:50.000Z (over 1 year ago)
- Last Synced: 2025-04-14T21:13:42.724Z (over 1 year ago)
- Topics: api, app, app-store-connect-api, apple, connect, node, npm, store
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@rage-against-the-pixel/app-store-connect-api
- Size: 694 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# app-store-connect-api
[](https://discord.gg/xQgMW9ufN4) [](https://www.npmjs.com/package/@rage-against-the-pixel/app-store-connect-api) [](https://www.npmjs.com/package/@rage-against-the-pixel/app-store-connect-api)
A TypeScript package for communicating with Apple [App Store Connect API](https://developer.apple.com/documentation/appstoreconnectapi)
- Automatically generated API client using the latest [OpenAPI specification](https://developer.apple.com/sample-code/app-store-connect/app-store-connect-openapi-specification.zip) from Apple.
- Fully typed models and methods for every endpoint.
- Designed for use in a Node.js server environment.
## Installation
```sh
npm install @rage-against-the-pixel/app-store-connect-api
```
## Authentication
To authenticate with the API you will need to [create a API keys for App Store Connect API](https://appstoreconnect.apple.com/access/api).
Download and save the private key `.p8` file to a save, secure location.
The contents of this file is your `privateKey`.
The `privateKeyId` and `issuerId` are both listed on the same page where you create your private key.
> [!NOTE]
> Individual keys do not require `issuerId`.
## Example
```ts
import { AppStoreConnectClient, AppStoreConnectOptions } from '@rage-against-the-pixel/app-store-connect-api';
async function main() {
const options: AppStoreConnectOptions = {
issuerId: '',
privateKeyId: '',
privateKey: '',
};
const client = new AppStoreConnectClient(options);
const { data: response, error } = await client.api.AppService.appsGetCollection({
query: {
limit: 10
}
});
if (error) {
console.error('Error fetching apps:', error);
} else {
const apps = response.data.map(app => ({
id: app.id,
name: app.attributes.name,
bundleId: app.attributes.bundleId
}));
console.log('Apps:', apps);
}
}
main();
```