IMPORTANT NOTE: Please read all of the steps since it involves a manual task that needs to be carried out once every few months to make sure the authorization keeps working.
STEP 1
Firstly we need to generate an apple JWT. This is NOT a super straightforward process. You can read about all the steps here:
https://developer.apple.com/documentation/applemusicapi/getting_keys_and_creating_tokensA better (easier & quicker) way to generate this JWT is using the scripts in this repository (shoutout to addisonwebb).
https://github.com/addisonwebb/Apple-JWT-GeneratorSTEP 2
Clone the repository from the previous step and edit the main.py file:
https://github.com/addisonwebb/Apple-JWT-Generator/blob/master/main.pyEdit the line that contains the timestamp.
From:
expiration_timestamp = issued_timestamp + 1800
To:
expiration_timestamp = issued_timestamp + 15777000
This puts the expiration of the token on 6 MONTHS. This means you need to update this token BEFORE it expires. In this case that is a bit less than once every 6 months.
Feel free to change this expiration date, it's just a UNIX timestamp, but remember that 6 months is the maximum as described by Apple.
STEP 3
Run the script in your terminal and copy the token.
Format the token into a new string. Please note the space between the words. Example:
Bearer eyXXXXXXXXXXXXXXXXXXXXX
STEP 4
Copy this string and paste it into the 'Authorization' field in this plugin's settings.
STEP 5
Use the plugin! In bubble you should now find the actions under 'Plugins' in any workflow.