n8n-nodes-rd-station-crm
Version:
n8n community node for RD Station CRM: API v1 (private token) and API v2 (OAuth2) — contacts, deals, organizations, tasks, notes, pipelines, stages, products, custom fields, sources, campaigns, loss reasons, users, teams and a real webhook trigger.
64 lines • 2.35 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RdStationCrmOAuth2Api = void 0;
// OAuth2 credential for the RD Station CRM API v2.
// RD Station uses two hosts: authorization on accounts.rdstation.com,
// token/refresh on api.rd.services. Client credentials go in the request body
// (not HTTP Basic), and there are no scopes. n8n's built-in OAuth2 handles the
// rolling refresh-token rotation automatically.
class RdStationCrmOAuth2Api {
constructor() {
this.name = 'rdStationCrmOAuth2Api';
this.extends = ['oAuth2Api'];
this.displayName = 'RD Station CRM OAuth2 API';
this.documentationUrl = 'https://developers.rdstation.com/reference/crm-v2-authentication';
this.icon = { light: 'file:rdStationCrm.svg', dark: 'file:rdStationCrm.dark.svg' };
this.properties = [
{
displayName: 'Grant Type',
name: 'grantType',
type: 'hidden',
default: 'authorizationCode',
},
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'hidden',
default: 'https://accounts.rdstation.com/oauth/authorize',
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'hidden',
default: 'https://api.rd.services/oauth2/token',
},
{
displayName: 'Scope',
name: 'scope',
type: 'hidden',
default: '',
},
{
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden',
default: '',
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'hidden',
default: 'body',
},
];
this.test = {
request: {
baseURL: 'https://api.rd.services/crm/v2',
url: '/users',
qs: { 'page[size]': 1 },
},
};
}
}
exports.RdStationCrmOAuth2Api = RdStationCrmOAuth2Api;
//# sourceMappingURL=RdStationCrmOAuth2Api.credentials.js.map