You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to write an connector that requires a user to send in a ClientID and Secret through OAuth2 as client_credentials in order to get an access token. I can successfully use the "post" connector method to retrieve the data, however, when I go to create a request to our API, I get 405 errors and CORS exceptions, even though I am passing the request options to bypass CORS policy.
return new Promise(function (resolve, reject) {
let requestOptions = {
bypassCorsPolicy: true,
headers: {
'Authorization': 'Bearer ' + token,
'Content-Type': 'application/json'
}
};
let endpoint = "API Path";
let requestBody = {};
post(endpoint, requestBody, requestOptions)
.then(data => {
console.log('Get Groups successful!');
console.log(data); // Process the response data
})
.catch(error => {
console.error('Error:', error);
});
});
The text was updated successfully, but these errors were encountered:
I am trying to write an connector that requires a user to send in a ClientID and Secret through OAuth2 as client_credentials in order to get an access token. I can successfully use the "post" connector method to retrieve the data, however, when I go to create a request to our API, I get 405 errors and CORS exceptions, even though I am passing the request options to bypass CORS policy.
return new Promise(function (resolve, reject) {
let requestOptions = {
bypassCorsPolicy: true,
headers: {
'Authorization': 'Bearer ' + token,
'Content-Type': 'application/json'
}
};
let endpoint = "API Path";
let requestBody = {};
The text was updated successfully, but these errors were encountered: