![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
appstore-connect-sdk
Advanced tools
The 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. The module is built on top of the OpenAPI Generator tool and provides support for all APIs based on OpenAPI specification.
English | 简体中文
The appstore-connect-sdk
module includes the following features:
npm install appstore-connect-sdk
appstore-connect-sdk
import { AppStoreConnectAPI } from "appstore-connect-sdk";
Go to App Store Connect -> Users and Access -> Keys and create your own key. This is also the page to find your private key ID
and the issuer ID
.
After downloading your private key, open the .p8
file containing the private key in a text editor. It should look like this:
-----BEGIN PRIVATE KEY-----
AIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgKEn1VBakCdHIEcdS
aBWr/9laASzaAbF2LP7wTYjHK52gCgYIKoZIzj0DAQehRANCAAQ/jf2sxRvXEhjn
srw8kJcHvO0dQ1KmUlxZvATsFsjJbdQ1yAENAWItUoeTV0rhdajcdOQxKl1OPse0
nNdXXbA4
-----END PRIVATE KEY-----
Now use this Private Key
together with the issuer ID
and the private key ID
to create your configuration:
const client = new AppStoreConnectAPI({
issuerId: "<YOUR ISSUER ID>",
privateKeyId: "<YOUR PRIVATE KEY ID>",
privateKey: "<YOUR PRIVATE KEY>",
});
For more information on how JWT works with the App Store Connect API, check out Apple's authentication guides:
You can find all available APIs in src/openapi/apis, these classes are generated according to App Store Connect API - OpenAPI specification, If you encounter any problems, please open an issue.
const api = await client.create(AppsApi);
const res = await api.appsGetCollection();
console.log(res);
Here's the complete code example:
import { AppStoreConnectAPI } from "appstore-connect-sdk";
import {
AppsApi,
AppEventLocalizationsApi,
} from "appstore-connect-sdk/openapi";
const client = new AppStoreConnectAPI({
issuerId: "<YOUR ISSUER ID>",
privateKeyId: "<YOUR PRIVATE KEY ID>",
privateKey: "<YOUR PRIVATE KEY>",
});
const api = await client.create(AppsApi);
const res = await api.appsGetCollection();
console.log(res);
By default, AppStoreConnectAPI uses its built-in fetch
function for HTTP requests. Note that this function requires Node.js version 18.0.0 or higher.
However, you can also configure any network library that adheres to the Fetch API standard specification by setting the fetchApi
option in the AppStoreConnectAPI constructor.
import { AppStoreConnectAPI } from "appstore-connect-sdk";
import fetch from "node-fetch";
new AppStoreConnectAPI({
// ...
fetchApi: fetch as unknown as FetchAPI, // All network requests are made via node-fetch
});
For 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.
import { AppStoreConnectAPI } from "appstore-connect-sdk";
new AppStoreConnectAPI({
// ...
basePath: "http://localhost:3000", // All network requests are made to http://localhost:3000
});
To update the OpenAPI-generated code, run the following command:
$ sh gen-openapi.sh
This will generate Typescript code through OpenAPI Generator based on the OpenAPI specification file officially released by Apple.
The 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.
We 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.
appstore-connect-sdk is available under the MIT license, and uses source code from open source projects. See the LICENSE file for more information.
This project was originally created by isaced but has had many great contributors. We're open to contributions of any kind to make this project even better.
FAQs
An App Store Connect API client for Node.js
The npm package appstore-connect-sdk receives a total of 2,407 weekly downloads. As such, appstore-connect-sdk popularity was classified as popular.
We found that appstore-connect-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.