I'm just getting 400 error responses to my requests sent to the WeatherKit REST API... haven't changed anything in my code for months.
Here is the verbose output from curl:
# curl -v "https://weatherkit.apple.com/api/v1/weather/en/51.5203/-0.1775?dataSets=forecastHourly%2CforecastNextHour&hourlyEnd=2024-07-04T09%3A03%3A36.962Z&hourlyStart=2024-06-24T09%3A03%3A36.962Z" -H "Authorization: Bearer [REDACTED]"
* Trying 23.73.4.202:443...
* Connected to weatherkit.apple.com (23.73.4.202) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS header, Finished (20):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.2 (OUT), TLS header, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: C=US; ST=California; O=Apple Inc.; CN=weather-data.apple.com
* start date: May 8 16:30:14 2024 GMT
* expire date: Nov 4 16:40:14 2024 GMT
* subjectAltName: host "weatherkit.apple.com" matched cert's "weatherkit.apple.com"
* issuer: C=US; O=Apple Inc.; CN=Apple Public Server ECC CA 1 - G1
* SSL certificate verify ok.
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
> GET /api/v1/weather/en/51.5203/-0.1775?dataSets=forecastHourly%2CforecastNextHour&hourlyEnd=2024-07-04T09%3A03%3A36.962Z&hourlyStart=2024-06-24T09%3A03%3A36.962Z HTTP/1.1
> Host: weatherkit.apple.com
> User-Agent: curl/7.81.0
> Accept: */*
> Authorization: Bearer [REDACTED]
>
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< Server: Apple
< Content-Length: 0
< X-Frame-Options: SAMEORIGIN
< Strict-Transport-Security: max-age=31536000; includeSubdomains
< X-XSS-Protection: 1; mode=block
< Access-Control-Allow-Origin: *
< X-Content-Type-Options: nosniff
< Content-Security-Policy: default-src 'self';
< X-REQUEST-ID: ed7d038c-ef82-61d8-a2cb-4522ff7d32ca
< X-Apple-Origin: fdcbff05-73b4-3a53-948b-343caa55a40e
< Date: Mon, 24 Jun 2024 09:18:00 GMT
< X-Cache: TCP_MISS from a23-73-3-202.deploy.akamaitechnologies.com (AkamaiGHost/11.5.2-56655770) (-)
< Connection: keep-alive
<
* Connection #0 to host weatherkit.apple.com left intact
Post
Replies
Boosts
Views
Activity
I understand that the condition code is a slightly brutal way of summarising the weather for a particular time, since it condenses everything down into a single code.
This would usually be the predominant or most significant weather for that time, e.g. if it's cloudy but there is also a hurricane, then it should report "hurricane" or at least "windy" rather than "cloudy".
By the same token, I think that most people would expect "rain" to be reported as the condition rather than just "cloudy", since most people would want to know more if it will rain than if there will be some clouds in the sky.
But I'm finding that very often a "PartlyCloudy" condition code is being returned for an hour in which there will be rain, even 0.6mm of rain, which isn't insignificant.
At other times it will return a "Drizzle" condition code for 0.5mm of rain.
Is anyone else finding these condition codes a bit hit and miss?
I'm using the REST API if it makes any difference.
I've had TestFlight installed for a while, and am running a beta version of one app. Recently, I've been getting a notification, maybe once a day, asking me to sign in to get the latest versions of apps.
But so far as I can tell, I'm already signed in. If I click on the notification, it takes me to TestFlight, but there is no option to sign in. It just shows me the one app I'm beta testing, which appears to be active.
In fact, I can't even see any option to sign out, so this notification is really confusing me.
Am I signed in? Am I not? Am I actually receiving new versions of apps in TestFlight? How do I sign in (or even sign out)?