UNPKG

n8n-nodes-tiktok-business-api

Version:

n8n community node for interacting with TikTok Business API

56 lines 2.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TiktokBusinessCookieApi = void 0; class TiktokBusinessCookieApi { constructor() { this.name = 'tiktokBusinessCookieApi'; this.displayName = 'Tiktok Business Cookie API'; this.documentationUrl = 'https://ads.tiktok.com/'; this.icon = 'file:../nodes/TiktokBusiness/tiktokbusiness.svg'; this.properties = [ { displayName: 'Base URL', name: 'baseUrl', type: 'hidden', default: 'https://ads.tiktok.com/api', required: true, }, { displayName: 'Csrf Token', name: 'csrfToken', type: 'string', required: true, default: '', hint: 'You can get from the browser console by running `document.cookie` at https://ads.tiktok.com/ and searching for `csrftoken`.', }, { displayName: 'Session Ads ID', name: 'sessionId', type: 'string', typeOptions: { password: true, }, required: true, default: '', hint: 'You can get from the browser console by running `document.cookie` at https://ads.tiktok.com/ and searching for `sessionid_ss_ads`.', }, ]; this.authenticate = { type: 'generic', properties: { headers: { 'x-csrftoken': '={{$credentials.csrfToken}}', 'Cookie': '=csrftoken={{$credentials.csrfToken}}; sessionid_ss_ads={{$credentials.sessionId}};', }, }, }; this.test = { request: { url: '={{$credentials.baseUrl}}/v2/i18n/account/account_switch_list/', method: 'GET', }, }; } } exports.TiktokBusinessCookieApi = TiktokBusinessCookieApi; //# sourceMappingURL=TiktokBusinessCookieApi.credentials.js.map