different ways to use API Keys to gain access to secured data

different ways to use API Keys to gain access to secured data?
i have tried the following code by adding my API key to the URL, and i was wondering if there more ways to do this.

let url:"https://newsapi.org/v2/everything?q=Apple&from=2022-03-07&sortBy=popularity&apiKey02b43b959f494dd6a6e7195a7a43fe02";

let req = new Request(url);

fetch(req)
.then(function(response) {
    console.log(response.json());
})