Issue
The API request "https://www.vattenfall.se/api/price/spot/pricearea/2022-02-09/2022-02-15/SN3" works from a browser but not when using: "curl -i -X GET href="https://www.vattenfall.se/api/price/spot/pricearea/2022-02-09/2022-02-15/SN3%22" rel="nofollow noreferrer">https://www.vattenfall.se/api/price/spot/pricearea/2022-02-09/2022-02-15/SN3"
It work some days ago but now suddenly it is blocked.
It would be great if there is anyone that can give me some clues on what's wrong here and if there is a solution.
Solution
I think this api is looking for user-agent. Try this.
curl -i -X GET https://www.vattenfall.se/api/price/spot/pricearea/2022-02-09/2022-02-15/SN3 --header 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36'```
Answered By - Marc Simon Answer Checked By - Dawn Plyler (WPSolving Volunteer)