WeatherKit JWT Token Verification

Is there a way to verify my JWT Token? I have some python code that uses the pypi.org jwt module, and would like to verify that the token coming out of it is correct. I am getting {"reason": "NOT_ENABLED"} and I would like to make sure that my token is constructed correctly.

I have seen a few others that have the "aud": entry in the header, but it's not mentioned in the documentation.

Further confusion over this documentation is the statement to use the "ES256" algorithm, but that requires .pem and a .pub files, but only a .p8 is supplied. (note I can extrapolate .pem and .pub files from the .p8, but that is not even discussed.

Can anyone from Apple chime in?

Replies

apple weather kit is down i am using python too does not work for me was working two days ago and everyone else is saying it is down to

Hi! I'm having the same issue and for me it's been a little tricky to use JWT. I use this https://jwt.io/ to check the structure of the JWT but it seems like the weatherkit is not working rn. What I did with the p8 file was to create the .pem and it worked a few months ago but today when I tried to use it again I only get 401 responses. I can't check if I have an error or if it is just the API not working.

I put together a YouTube video describing how I overcame the JWT fiasco. Please comment if it helps:
https://youtu.be/TQdtIb-Sgqk?si=j0LwEGPh4lkn_wdR