- Getting The Team ID
-
Step 1 Open The Apple Developer Account Get the Team ID under Membership Details, Copy and paste it into the example.json
-
Getting The Key Open The Apple Developer Account (Again) Navigate to Keys Click on the + to create a new Key (Name it whatever) Choose whatever services you need and then Continue Copy and paste that AuthKey_XXXXXXXXXX.p8 into the src folder edit the main.rs to use your key
let private_key = fs::read_to_string("AuthKey_XXXXXXXXXX.p8").expect("Failed to read private key");
-
Editing the json file run this command inside the src folder
cp example.json jwt.json
afterwards open the jwt.json and copy and paste your Key ID into apns_key_id
{ "apns_key_id": "" }
-
Completed! You should be able to run
cargo run
and the output should look like this
Generated token:
-