{"id":19584818,"url":"https://github.com/flex-development/adt-api","last_synced_at":"2026-04-20T06:04:17.537Z","repository":{"id":63012460,"uuid":"342610254","full_name":"flex-development/adt-api","owner":"flex-development","description":"Generate JSON Web Tokens to authenticate with the Apple Music API.","archived":false,"fork":false,"pushed_at":"2023-03-05T21:37:05.000Z","size":852,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"next","last_synced_at":"2025-02-26T12:43:11.672Z","etag":null,"topics":["apple","apple-developer-token","apple-developers","apple-music","apple-music-api","jsonwebtoken","jwt"],"latest_commit_sha":null,"homepage":"https://adt-api.flexdevelopment.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flex-development.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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}},"created_at":"2021-02-26T15:03:02.000Z","updated_at":"2021-02-28T19:43:46.000Z","dependencies_parsed_at":"2025-01-10T07:31:39.110Z","dependency_job_id":null,"html_url":"https://github.com/flex-development/adt-api","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/flex-development/adt-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fadt-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fadt-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fadt-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fadt-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flex-development","download_url":"https://codeload.github.com/flex-development/adt-api/tar.gz/refs/heads/next","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fadt-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32035278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["apple","apple-developer-token","apple-developers","apple-music","apple-music-api","jsonwebtoken","jwt"],"created_at":"2024-11-11T07:49:54.468Z","updated_at":"2026-04-20T06:04:17.507Z","avatar_url":"https://github.com/flex-development.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apple Developer Token API\n\nGenerate JSON Web Tokens for use with the Apple Music API\n\n[![TypeScript](https://badgen.net/badge/-/typescript?icon=typescript\u0026label)](https://www.typescriptlang.org/)\n[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)\n\n## Overview\n\n[Getting Started](#getting-started)  \n[Usage](#usage)  \n[Built With](#built-with)  \n[Contributing](docs/CONTRIBUTING.md)  \n[Deployment](docs/DEPLOYMENT.md)\n\n## Getting Started\n\nThe Apple Developer Token (ADT) API is a serverless REST API that can be used to\ngenerate JSON Web Tokens (JWTs) suitable for use with the Apple Music API.\n\nFor more information, see [Getting Keys and Creating Tokens][1] from the Apple\nDeveloper docs.\n\n## Usage\n\n### Create Developer Token\n\nGenerates a JSON Web Token (JWT) suitable for use with the Apple Music API.\n\n- **URL**: `https://adt-api.flexdevelopment.vercel.app/token`\n- **Method**: `POST`\n\n#### Authentication\n\nThe ADT API uses Basic Authentication to retrieive the Musickit identifier and\nprivate key used to generate developer tokens.\n\n**Example**\n\n```dotenv\nAPPLE_MUSICKIT_PRIVATE_KEY='-----BEGIN PRIVATE\nKEY-----\\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/\nXX\\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\\nXXX\n+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n+XXXXX\\nXXXXXX\\n-----END PRIVATE KEY-----\\n'\nAPPLE_MUSICKIT_PRIVATE_KEY_ID='XXXXXXXXXX'\n```\n\n#### Query Parameters\n\n| name        | type     | default    | required | description           |\n| ----------- | -------- | ---------- | -------- | --------------------- |\n| `expiresIn` | `number` | `15777000` | false    | Token expiration time |\n| `team`      | `string` |            | true     | Apple Team ID         |\n\n**Notes**\n\n- `expiresIn` must not exceed `15777000` (6 months in seconds)\n- `team` is a 10-character string that can be retrieved from your developer\n  account\n- A `NotAuthenticated` error will be thrown if `team` is invalid\n\n#### Sample Response\n\n```json\n\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c\"\n```\n\n### Documentation\n\nRetrieve the ADT API documentation as a JSON object. Documentation follows\n[OpenAPI Specification v3.0.0 standards][2].\n\n- **URL**: `https://adt-api.flexdevelopment.vercel.app`\n- **Method**: `GET`\n\n#### Sample Response\n\n```json\n{\n  \"openapi\": \"3.0.0\",\n  \"info\": {\n    \"title\": \"Apple Developer Token API\",\n    \"description\": \"Generate JSON Web Tokens for use with the Apple Music API.\",\n    \"termsOfService\": \"\",\n    \"contact\": {\n      \"name\": \"GitHub\",\n      \"url\": \"https://github.com/flex-development/adt-api\"\n    },\n    \"license\": {\n      \"name\": \"License - BSD 3 Clause\",\n      \"url\": \"https://spdx.org/licenses/BSD-3-Clause.html\"\n    },\n    \"version\": \"1.0.0\"\n  },\n  \"servers\": [\n    {\n      \"description\": \"Production\",\n      \"url\": \"https://adt-api.flexdevelopment.vercel.app\"\n    },\n    {\n      \"description\": \"Next\",\n      \"url\": \"https://adt-api-git-next-flexdevelopment.vercel.app\"\n    }\n  ],\n  \"tags\": [],\n  \"paths\": {\n    \"/token\": {\n      \"post\": {\n        \"summary\": \"Create an Apple Developer token\",\n        \"description\": \"Generates a JSON Web Token (JWT) suitable for use with the Apple Music API.\",\n        \"operationId\": \"token-post\",\n        \"parameters\": [\n          {\n            \"name\": \"expiresIn\",\n            \"in\": \"query\",\n            \"description\": \"Expiration time of registered claim key in seconds. Must not exceed `15777000` (6 months in seconds)\",\n            \"schema\": {\n              \"type\": \"integer\"\n            }\n          },\n          {\n            \"name\": \"team\",\n            \"in\": \"query\",\n            \"description\": \"Apple Team ID\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Created\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/AppleDeveloperToken\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"BadRequest\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequest\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"NotAuthenticated\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/NotAuthenticated\"\n                }\n              }\n            }\n          },\n          \"500\": {\n            \"description\": \"GeneralError\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/GeneralError\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\"BasicAuth\"]\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"AppleDeveloperToken\": {\n        \"type\": \"string\"\n      },\n      \"BadRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"className\": {\n            \"type\": \"string\",\n            \"example\": \"bad-request\"\n          },\n          \"code\": {\n            \"type\": \"integer\",\n            \"example\": 400\n          },\n          \"data\": {\n            \"type\": \"object\",\n            \"example\": {}\n          },\n          \"errors\": {\n            \"type\": \"object\",\n            \"example\": {}\n          },\n          \"message\": {\n            \"type\": \"string\"\n          },\n          \"name\": {\n            \"type\": \"string\",\n            \"example\": \"BadRequest\"\n          }\n        }\n      },\n      \"GeneralError\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"className\": {\n            \"type\": \"string\",\n            \"example\": \"general-error\"\n          },\n          \"code\": {\n            \"type\": \"integer\",\n            \"example\": 500\n          },\n          \"data\": {\n            \"type\": \"object\",\n            \"example\": {}\n          },\n          \"errors\": {\n            \"type\": \"object\",\n            \"example\": {}\n          },\n          \"message\": {\n            \"type\": \"string\"\n          },\n          \"name\": {\n            \"type\": \"string\",\n            \"example\": \"GeneralError\"\n          }\n        }\n      },\n      \"NotAuthenticated\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"className\": {\n            \"type\": \"string\",\n            \"example\": \"not-authenticated\"\n          },\n          \"code\": {\n            \"type\": \"integer\",\n            \"example\": 401\n          },\n          \"data\": {\n            \"type\": \"object\",\n            \"example\": {}\n          },\n          \"errors\": {\n            \"type\": \"object\",\n            \"example\": {}\n          },\n          \"message\": {\n            \"type\": \"string\"\n          },\n          \"name\": {\n            \"type\": \"string\",\n            \"example\": \"NotAuthenticated\"\n          }\n        }\n      },\n      \"NotImplemented\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"className\": {\n            \"type\": \"string\",\n            \"example\": \"not-implemented\"\n          },\n          \"code\": {\n            \"type\": \"integer\",\n            \"example\": 501\n          },\n          \"data\": {\n            \"type\": \"object\",\n            \"example\": {}\n          },\n          \"errors\": {\n            \"type\": \"object\",\n            \"example\": {}\n          },\n          \"message\": {\n            \"type\": \"string\"\n          },\n          \"name\": {\n            \"type\": \"string\",\n            \"example\": \"NotImplemented\"\n          }\n        }\n      }\n    },\n    \"securitySchemes\": {\n      \"BasicAuth\": {\n        \"description\": \"Musickit identifier and private key\",\n        \"type\": \"http\",\n        \"scheme\": \"basic\"\n      }\n    }\n  },\n  \"externalDocs\": {\n    \"description\": \"Apple Developer Docs - Getting Keys and Creating Tokens\",\n    \"url\": \"https://developer.apple.com/documentation/applemusicapi/getting_keys_and_creating_tokens\"\n  }\n}\n```\n\n### Errors\n\nIf an error is thrown, it will have the following shape:\n\n```json\n{\n  \"name\": \"GeneralError\",\n  \"message\": \"\",\n  \"code\": 500,\n  \"className\": \"general-error\",\n  \"data\": {},\n  \"errors\": {}\n}\n```\n\n## Built With\n\n- [Vercel][3] - Hosting platform for serverless functions\n- [jsonwebtoken][4] - JSON Web Token implementation for Node.js\n\n[1]:\n  https://developer.apple.com/documentation/applemusicapi/getting_keys_and_creating_tokens\n[2]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md\n[3]: https://vercel.com/docs/serverless-functions/introduction\n[4]: https://github.com/auth0/node-jsonwebtoken\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflex-development%2Fadt-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflex-development%2Fadt-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflex-development%2Fadt-api/lists"}