import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
suitecrm: {
type: "app",
app: "suitecrm",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.suitecrm.$auth.api_url}/Api/V8/module/Users`,
headers: {
Authorization: `Bearer ${this.suitecrm.$auth.oauth_access_token}`,
},
})
},
})
SuiteCRM uses OAuth authentication. When you connect your SuiteCRM account, Pipedream will open a popup window where you can sign into SuiteCRM and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any SuiteCRM API.
Pipedream requests the following authorization scopes when you connect your account:
POST{{custom_fields.api_url}}/Api/access_tokencontent-type: application/x-www-form-urlencodedaccept: application/jsonclient_id={{custom_fields.client_id}}&client_secret={{custom_fields.client_secret}}&grant_type=client_credentialsPOST{{custom_fields.api_url}}/Api/access_tokenaccept: application/jsonContent-Type: application/x-www-form-urlencodedclient_id={{custom_fields.client_id}}&client_secret={{custom_fields.client_secret}}&grant_type=client_credentials