Authentication
To use the Open Weather Map GraphQL endpoint, you need to authenticate your requests with our service via RapidAPI and Open Weather Map.
RapidAPI
You can access the Open Weather Map API through RapidAPI. See the RapidAPI Open Weather Map API for more information.
You will need to provide the x-rapidapi-key
header with your RapidAPI key. You can find your RapidAPI key in the RapidAPI Playground.
Open Weather Map
So we can retrieve the data from the Open Weather Map API, you need to provide your Open Weather Map appid
. You can do this in one of two ways:
- Include the
appid
in the request header asx-owm-appid
. - Pass the
appid
as an argument in theapi
field.
query {
api(appid: "<APP_ID>") {
# ... rest of the query
}
}
You only need to provide the appid
using one of the methods above.