Skip to content

Instantly share code, notes, and snippets.

View developerJuiceLozzoc's full-sized avatar
🐅

Conner DeNale Maddalozzo developerJuiceLozzoc

🐅
View GitHub Profile
@developerJuiceLozzoc
developerJuiceLozzoc / AppleWebTokenExample.js
Created March 19, 2023 18:45
How to create a correct Bearer Token to use with Apple Music Api, or App Store Connect API.
const fs = require('fs')
const jose = require('jose')
const jwt = require('jsonwebtoken')
let privateKey = fs.readFileSync('./AuthKey_949A39XT34.p8', 'utf8');
let credentials = {
/* obtained by creating a key by linking existing music kit identifier
create this in developer.apple.com -> Account -> Program resources -> Keys,
you must first create identifier because you create a key with existing identifier.