您好,我正在尝试将 Monday 集成到我的 chrome 扩展程序中,我收到了身份验证代码,当我请求令牌以换取身份验证代码时,我收到了代码 500 ,有人能指出我正确的方向吗
我正在使用的一些代码
chrome.identity.launchWebAuthFlow(
{
interactive: true,
url: `https://auth.monday.com/oauth2/authorize?client_id=${MONDAY_CLIENT_ID}&state=${MONDAY_STATE}&redirect_uri=${MONDAY_REDIRECT_URI}&scope=me:read+boards:read+boards:write+updates:write`,
},
(url?: string) => {
let code = url.substring(url.indexOf("code=") + "code=".length);
code = code.substring(0, code.indexOf("&"));
const requestTokenUrl = new URL("https://auth.monday.com/oauth2/token");
const params = { code, client_id:MONDAY_CLIENT_ID ,client_secret:CLIENT_SECRET};
requestTokenUrl.search = new URLSearchParams(params).toString();
axios.get(requestTokenUrl.toString()).then((res)=>{
console.log(res.data)
});
}
);