Glad you were able to find a solution that worked for you.
Cheers!
davinci wrote:I tried your plugin to substitute FantasticWeather. But I can't get any data. This is probably because my API uses OAuth 2.0:
https://developer.srgssr.ch/faq
Is there any way you can implement this?
Thank you
davinci wrote:Yes I tried, but it seems that I have to get the token first and it expires. Not sure how to automate this.
curl -X POST \
'https://api.srgssr.ch/oauth/v1/accesstoken?grant_type=client_credentials' \
-H 'Authorization: Basic <"KEY:SECRET"MANUALLY CONVERTED TO base64 >' \
-H 'Cache-Control: no-cache' \
-H 'Content-Length: 0' \
-H 'Postman-Token: 24264e32-2de0-f1e3-f3f8-eab014bb6d76'
curl -X GET \
'https://api.srgssr.ch/srf-meteo/colors' \
-H 'Authorization: Bearer MANUALLY ADDED RECEIVED_TOKEN' \
-H 'Cache-Control: no-cache' \
-H 'Postman-Token: 56128353-805e-4974-6689-5ef6d86e2d80'
Users browsing this forum: No registered users and 1 guest