WeatherKit REST authentication errors starting Sept 8th

Since September 8th, I've been unable to access the WeatherKit REST API due to authentication errors -- no changes on my side, but now I'm always getting responses like the following from the API:

"status": 403,
"error": "Forbidden",
"message": "Access Denied",

Has anyone else run into this problem in the last few days, and/or know how to work around it?

The only place I've seen other report reporting so far is here: https://twitter.com/keff85/status/1569054904655773696

I tried upgrading to a paid WeatherKit plan (the lowest level is $50/month) but that doesn't seem to have helped. I believe WeatherKit Swift is working fine, but WeatherKit REST seems to be down -- or perhaps the auth changed somehow without warning?

Same here, I have decoded the JWT token and ensured it contains the exact same items as the sample token at https://developer.apple.com/documentation/weatherkitrestapi/request_authentication_for_weatherkit_rest_api

{
    "alg": "ES256",
    "kid": "ABC123DEFG",
    "id": "DEF123GHIJ.com.example.weatherkit-client"
}
{
    "iss": "DEF123GHIJ",
    "iat": 1437179036,
    "exp": 1493298100,
    "sub": "com.example.weatherkit-client"
}

The key and service id used to work on friday, and then since then I am getting 403 error for every request.

The response from WeatherKit API is like this:

{"timestamp":"2022-09-13T07:19:17Z","status":403,"error":"Forbidden","message":"Access Denied","path":"/api/v1/availability/47.87/-94.28"}

Reported as FB11495570

Hi there, we took a look at your app configuration and we noticed you've not enabled the WeatherKit service under the "App Services" section on your APP ID, see instructions on how to do that here. Once you've enabled it, please give it a try again and let us know how it goes.

Thank you! This is it - the problem was that at https://developer.apple.com/account/resources/identifiers/list → my app, I had to check WeatherKit not just in Capabilities tab, but under App Services as well! During the beta I had only Capabilities checked, and that seemed to work until Friday, when apparently the check for App Services was activated. Everything is working now for me :).

That fixed things for me, thank you! (I'm not sure why it was working earlier without that step -- thanks so much for the help!)

Same here... it worked in the betas, but stopped working now that I want to publish :( Weatherkit is enabled in both Capacities, and in the App Services...

I have decoded the JWT token and ensured it contains the exact same items as the sample token at https://developer.apple.com/documentation/weatherkitrestapi/request_authentication_for_weatherkit_rest_api

{
    "alg": "ES256",
    "kid": "3J4F34**24",
    "id": "KC697SNQ2X.com.caramba.instaweather"
}
{
    "iss": "KC697SNQ2X",
    "iat": 1437179036,
    "exp": 1493298100,
    "sub": "com.caramba.instaweather"
}

response is

{"timestamp":"2022-09-16T18:17:15Z","status":403,"error":"Forbidden","message":"Access Denied","path":"/api/v1/availability/37.323/122.032"}   

Same here, I got a 403 even though my app had WeatherKit enabled under both App Id -> Capabilities as well as App id -> App Services. The solution was adding a missing dot in the full id sent in the request

$fullId = $teamId . "." . $appId; $payload = [ 'iss' => $teamId, 'iat' => $now, 'exp' => $now + 3600, 'sub' => $appId, 'jti' => $fullId ]; $header = [ 'id' => $fullId ]; $jwt = JWT::encode($payload, $privateKey, $alg, $keyId, $header);

Not sure why this is happening - anyone with ideas?

WeatherKit REST authentication errors starting Sept 8th
 
 
Q