I have a Google Cloud AutoML NL model ready to use. I wish to link this with my web app with Firebase backend. Following is my code to call. There is authorization issue. I want to understand how to authorize the app to help the client apps get access to AutoML model.
async add(data){
var headers = new Headers();
headers.append('Content-Type:application/json')
var options = {
method: 'POST',
headers,
body: JSON.stringify(data)
}
var request = new Request('https://automl.googleapis.com/v1beta1/projects/project1/locations/us-central1/models/TCN5678:predict', options )
var response = await fetch(request)
var status = await response.status
console.log(status)}