diff --git a/packages/nc-gui/components/smartsheet/Details.vue b/packages/nc-gui/components/smartsheet/Details.vue index 32484a243f..c9ac4c421d 100644 --- a/packages/nc-gui/components/smartsheet/Details.vue +++ b/packages/nc-gui/components/smartsheet/Details.vue @@ -76,7 +76,7 @@ watch(openedSubTab, () => { diff --git a/packages/nc-gui/components/smartsheet/details/Api.vue b/packages/nc-gui/components/smartsheet/details/Api.vue index 6b5ca12e5f..5153df6ef3 100644 --- a/packages/nc-gui/components/smartsheet/details/Api.vue +++ b/packages/nc-gui/components/smartsheet/details/Api.vue @@ -73,7 +73,13 @@ const snippet = computed( () => new HTTPSnippet({ method: 'GET', - headers: [{ name: 'xc-token', value: '', comment: 'API token' }], + headers: [ + { + name: 'xc-token', + value: `CREATE_YOUR_API_TOKEN_FROM ${location.origin + location.pathname}#/account/tokens`, + comment: 'API token', + }, + ], url: apiUrl.value, queryString: [ ...Object.entries(queryParams.value || {}).map(([name, value]) => { @@ -95,7 +101,7 @@ const code = computed(() => { const api = new Api({ baseURL: "${(appInfo.value && appInfo.value.ncSiteUrl) || '/'}", headers: { - "xc-token": "" + "xc-token": "CREATE_YOUR_API_TOKEN_FROM ${location.origin + location.pathname}#/account/tokens" } }) diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json index beca2519c0..8b2d62d71a 100644 --- a/packages/nc-gui/lang/en.json +++ b/packages/nc-gui/lang/en.json @@ -738,6 +738,7 @@ "noAccess": "No access", "restApis": "Rest APIs", "apis": "APIs", + "apiSnippet": "API Snippets", "includeData": "Include Data", "includeView": "Include View", "includeWebhook": "Include Webhook",