Frost v1 (work in progress)
DISCLAIMER: This version of Frost is still work in progress. MET Norway does not guarantee that the service will always behave 100% according to documentation or expectations. Authentication has been turned on as of late May 2023.


Authentication

Most users of Frost will only access open data through the API and as such will use basic authentication. This means that you use the user id and secret that you can create here in the request:

    
curl --user "client ID":"client secret" 'https://frost-beta.met.no/api/v1/obs/met.no/kvkafka/get?stationids=18700&elementids=air_temperature&time=latest'
    

Those that have special access to restricted data will need to use the OAuth 2 workflow. These users will need to be provided with a client id and secret and then use it to get tokens to send with each request:

    
curl --data "grant_type=client_credentials&client_id=X&client_secret=X" https://login.met.no/auth/realms/External/protocol/openid-connect/token 
    
curl -H 'Authorization: Bearer TOKEN' 'https://frost-beta.met.no/api/v1/obs/met.no/kvkafka/get?stationids=18700&elementids=air_temperature&time=latest'
    

Those that want to use the OAuth 2 tokens that do not have special access will have to use a different endpoint to get a generic token:

    
curl --data "grant_type=client_credentials&client_id=X&client_secret=X" https://frost-beta.met.no/auth/token 
    

Here are some python functions that show how the 2 workflows work: