URLSearchParams
code:ts
const param = new URLSearchParams({ access_token, image_id: imageId });
const a = await fetch(https://api.gyazo.com/api/images/${imageId}?${param.toString()});
例
code:js
const a = new URLSearchParams(window.location.search)
console.log(a.has('piyo')) // true
console.log(a.get('piyo')) // 1