Assuming assertion is required, the following result was found.
successfully if you go get your public key, paste both keys into jwt.io (these don't change), then paste the encoded assertion. Anyway, this is how you generate the JWT header // Build token header. Specify algorithm $api['jwt']['header']['alg'] =...