Hi all,
I am trying to hydrate my app with musicbrainz DB as a json file. When checking the console I get an error “You are not authorized to access this resource.”
How do I gain access? How do I make a user agent header with fetch API in React?
useEffect(() => {
fetch(‘https://musicbrainz.org/ws/2/release-group/3bd76d40-7f0e-36b7-9348-91a33afee20e?inc=genres+user-genres&fmt=json’)
.then(response => response.json())
.then(myJson => {
setData(myJson);
})
.catch(function(error){console.log(error);})
}, [])