No project description provided
Project description
Apple Music Keyman
A small utility that gets Apple Music API keys for you. It even allows getting user tokens, which are a bit more annoying since they involve a whole OAuth flow.
This tool is rudimentary and a work in progress.
How Apple Music authorization works
You need a couple of things:
- Apple Developer subscription. Yes, a paid one
- A certificate generated with access to Apple Music & MusicKit APIs.
- A Key ID for that certificate.
- A Team ID for your developer account
Using the team ID, private key file (.p8) and key ID, you build a JWT that becomes your developer token. This token alone allows access to AM resources that aren't related to a user.
With that developer token, you can initiate an OAuth flow to get a user token. This one allows you to access the listening history for your account, for example.
Using Keyman
poetry install
# Set up the tool
poetry run am-keyman configure TEAM_ID_HERE KEY_ID_HERE KEY_FILE_PATH
# Get your developer token
poetry run am-keyman get-dev-token
# OPTIONAL: Grab a user token for yourself
poetry run am-keyman get-user-token DEV_TOKEN_HERE
# ... a web server will open up, follow the instructions
# ... after completion, the token will show up in the console
Important note
If you mean to grab a user token using the command-line utility, do not use Firefox.
The stricter security settings built into the browser will break the OAuth flow and it won't work.
Safari worked great for me.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file am_keyman-0.1.0.tar.gz.
File metadata
- Download URL: am_keyman-0.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e63714b49056098942e7584167b158448200aef0dd2505e219e074e10aa679ce
|
|
| MD5 |
73e5843ce70ea72560c7496126bae662
|
|
| BLAKE2b-256 |
975aded5ae642645b8fd99907d378846b83342372fe387ab5450eab2454c1f44
|
File details
Details for the file am_keyman-0.1.0-py3-none-any.whl.
File metadata
- Download URL: am_keyman-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
622852ab4bae72db18d1530b5c031bba0685e1dedf41911842a596d0af2f2119
|
|
| MD5 |
62934aff061cf48d52574639272a373e
|
|
| BLAKE2b-256 |
07cf51b86570326da289b5fc3e796fb4ed37c486abbdf2b6b10d5cd19cc18d64
|