Authentication
GNews API uses a system of API keys to authenticate you. If you don't have an API key yet, you have to sign up first. Once you have created an account you will find your API key in your dashboard.
Get API keyYour API key must be passed in the query string of your HTTP request like this:
https://gnews.io/api/v4/{endpoint}?apikey=API_KEY
If the apikey
parameter is not set or the API key provided is invalid, you will receive a 401 - Unauthorized
HTTP error.