Problem Signing the JWT

Hi everyone,

I’m using the following data which I created following the JWT schema in the docs:

data = {
     "exp": 1512850191,
     "user_id": "37844993",
     "role": "external"

After that I use the secret key which I can find under Extension Details > Settings > Secret Keys to sign it. I use the HS256 algorithm in case its relevant.

Then when trying to do a call to API using Bearer I get 401 unauthorized. I’d like to know if I’m missing something or doing something wrong and what I could do to fix it. I’m also willing to give more information if that’s necessary.

Thank you very much

After reading another post I only had to base64 decode the secret before signing the JWT.

Hope this helps someone else too.