n8n-nodes-gohighlevel
Version:
n8n node for GoHighLevel API v2
81 lines • 3.38 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GoHighLevelOAuth2Api = void 0;
class GoHighLevelOAuth2Api {
constructor() {
this.name = 'goHighLevelOAuth2Api';
this.extends = ['oAuth2Api'];
this.displayName = 'GoHighLevel OAuth2 API';
this.documentationUrl = 'https://highlevel.stoplight.io/docs/integrations/docs/Authentication/oauth2.md';
this.properties = [
{
displayName: 'Grant Type',
name: 'grantType',
type: 'hidden',
default: 'authorizationCode',
},
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'options',
default: 'https://marketplace.leadconnectorhq.com/oauth/chooselocation',
required: true,
options: [
{
name: 'White-Label',
value: 'https://marketplace.leadconnectorhq.com/oauth/chooselocation',
},
{
name: 'Standard',
value: 'https://marketplace.gohighlevel.com/oauth/chooselocation',
},
],
},
{
displayName: 'Scope',
name: 'scope',
type: 'string',
hint: "Separate scopes by space, scopes needed for node: 'locations.readonly contacts.readonly contacts.write opportunities.readonly opportunities.write users.readonly'",
default: "contacts.readonly contacts.write locations.write locations.readonly funnels/redirect.readonly funnels/page.readonly funnels/funnel.readonly funnels/pagecount.readonly funnels/redirect.write products.readonly products.write products/prices.readonly products/prices.write users.readonly users.write opportunities.readonly opportunities.write locations/customFields.readonly locations/customFields.write",
required: true,
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'hidden',
default: 'https://services.leadconnectorhq.com/oauth/token',
},
{
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden',
default: '',
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'hidden',
default: 'body',
},
];
this.authenticate = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.accessToken}}',
Version: '2021-07-28',
Location: '={{$credentials.locationId}}',
},
},
};
this.test = {
request: {
baseURL: 'https://services.leadconnectorhq.com',
url: '/locations/{{$credentials.locationId}}',
method: 'GET',
},
};
}
}
exports.GoHighLevelOAuth2Api = GoHighLevelOAuth2Api;
//# sourceMappingURL=GoHighLevelOAuth2Api.credentials.js.map