{"id":116500,"date":"2025-07-03T17:50:20","date_gmt":"2025-07-03T10:50:20","guid":{"rendered":"https:\/\/tino.vn\/blog\/?p=116500"},"modified":"2026-10-23T18:29:53","modified_gmt":"2026-10-23T11:29:53","slug":"cach-tao-api-key-trong-n8n","status":"publish","type":"post","link":"https:\/\/tino.vn\/blog\/cach-tao-api-key-trong-n8n\/","title":{"rendered":"C\u00e1ch t\u1ea1o API key trong n8n v\u00e0 g\u1ecdi n8n public API"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>API key c\u1ee7a n8n<\/strong> d\u00f9ng \u0111\u1ec3 g\u1ecdi n8n public API t\u1eeb b\u00ean ngo\u00e0i, v\u00ed d\u1ee5 li\u1ec7t k\u00ea, t\u1ea1o ho\u1eb7c publish workflow b\u1eb1ng script. T\u1ea1o key t\u1ea1i Settings > n8n API > Create an API key, \u0111\u1eb7t Label v\u00e0 Expiration, sao ch\u00e9p key ngay v\u00ec n8n ch\u1ec9 hi\u1ec3n th\u1ecb m\u1ed9t l\u1ea7n, r\u1ed3i g\u1eedi key trong header <code>X-N8N-API-KEY<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">B\u00e0i n\u00e0y h\u01b0\u1edbng d\u1eabn t\u1ea1o API key trong <a href=\"https:\/\/tino.vn\/blog\/n8n-la-gi\/\">n8n<\/a>, g\u1ecdi th\u1eed API v\u00e0 t\u1ea1o credential n8n API \u0111\u1ec3 d\u00f9ng trong workflow. N\u1ebfu b\u1ea1n c\u1ea7n g\u1ecdi API c\u1ee7a d\u1ecbch v\u1ee5 kh\u00e1c t\u1eeb n8n (chi\u1ec1u ng\u01b0\u1ee3c l\u1ea1i), xem <a href=\"https:\/\/tino.vn\/blog\/cach-them-api-vao-n8n\/\">c\u00e1ch th\u00eam API v\u00e0o n8n<\/a>; c\u00f2n c\u00e1c b\u01b0\u1edbc d\u1ef1ng workflow c\u00f3 \u1edf <a href=\"https:\/\/tino.vn\/blog\/cach-tao-workflow-tren-n8n-co-ban\/\">h\u01b0\u1edbng d\u1eabn t\u1ea1o workflow tr\u00ean n8n<\/a>.<\/p>\n\n\n\n<h2 id=\"API_n8n_l\u00e0_g\u00ec?\">API n8n l\u00e0 g\u00ec?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">API (Application Programming Interface) c\u1ee7a n8n l\u00e0 t\u1eadp quy t\u1eafc cho ph\u00e9p \u1ee9ng d\u1ee5ng kh\u00e1c \u0111i\u1ec1u khi\u1ec3n n8n b\u1eb1ng l\u1eadp tr\u00ecnh. Thay v\u00ec thao t\u00e1c tay tr\u00ean giao di\u1ec7n, b\u1ea1n d\u00f9ng API \u0111\u1ec3 t\u1ea1o, qu\u1ea3n l\u00fd <a href=\"https:\/\/tino.vn\/blog\/cach-tao-workflow-tren-n8n-co-ban\/\">workflow<\/a>, <a href=\"https:\/\/tino.vn\/blog\/credential-trong-n8n-la-gi\/\">credential<\/a>, tag ho\u1eb7c l\u1ea5y d\u1eef li\u1ec7u c\u00e1c l\u1ea7n ch\u1ea1y.<\/p>\n\n\n\n<h3 id=\"Vai_tr\u00f2_v\u00e0_ch\u1ee9c_n\u0103ng_c\u1ee7a_API_n8n\">Vai tr\u00f2 v\u00e0 ch\u1ee9c n\u0103ng c\u1ee7a API n8n<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Qu\u1ea3n l\u00fd workflow t\u1eeb b\u00ean ngo\u00e0i:<\/strong> t\u1ea1o, s\u1eeda, publish ho\u1eb7c unpublish workflow.<\/li>\n\n\n<li><strong>Qu\u1ea3n l\u00fd credential:<\/strong> t\u1ea1o, x\u00f3a th\u00f4ng tin x\u00e1c th\u1ef1c cho c\u00e1c d\u1ecbch v\u1ee5.<\/li>\n\n\n<li><strong>Truy xu\u1ea5t d\u1eef li\u1ec7u:<\/strong> l\u1ea5y danh s\u00e1ch workflow, executions v\u00e0 t\u00e0i nguy\u00ean kh\u00e1c.<\/li>\n\n\n<li><strong>T\u00edch h\u1ee3p h\u1ec7 th\u1ed1ng:<\/strong> n\u1ed1i n8n v\u1edbi \u1ee9ng d\u1ee5ng n\u1ed9i b\u1ed9, c\u00f4ng c\u1ee5 CI\/CD.<\/li>\n<\/ul>\n\n\n\n<h3 id=\"Khi_n\u00e0o_c\u1ea7n_t\u1ea1o_API_key_n8n?\">Khi n\u00e0o c\u1ea7n t\u1ea1o API key n8n?<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>T\u1ef1 \u0111\u1ed9ng h\u00f3a n\u00e2ng cao:<\/strong> \u0111i\u1ec1u khi\u1ec3n n8n t\u1eeb \u1ee9ng d\u1ee5ng kh\u00e1c, qu\u1ea3n l\u00fd credential b\u1eb1ng script, l\u1ea5y d\u1eef li\u1ec7u workflow \u0111\u1ec3 ph\u00e2n t\u00edch.<\/li>\n\n\n<li><strong>Ph\u00e1t tri\u1ec3n \u1ee9ng d\u1ee5ng t\u00f9y ch\u1ec9nh:<\/strong> \u1ee9ng d\u1ee5ng c\u1ee7a b\u1ea1n c\u1ea7n t\u1ea1o workflow \u0111\u1ed9ng ho\u1eb7c theo d\u00f5i tr\u1ea1ng th\u00e1i ch\u1ea1y.<\/li>\n\n\n<li><strong>Backup v\u00e0 kh\u00f4i ph\u1ee5c t\u1ef1 \u0111\u1ed9ng:<\/strong> workflow sao l\u01b0u c\u1ea7n API key \u0111\u1ec3 \u0111\u1ecdc danh s\u00e1ch workflow, credential, xem <a href=\"https:\/\/tino.vn\/blog\/cach-backup-va-restore-workflow-n8n\/\">c\u00e1ch backup v\u00e0 restore workflow n8n<\/a>.<\/li>\n\n\n<li><strong>CI\/CD:<\/strong> tri\u1ec3n khai ho\u1eb7c c\u1eadp nh\u1eadt workflow nh\u01b0 m\u1ed9t b\u01b0\u1edbc trong quy tr\u00ecnh ph\u00e1t tri\u1ec3n ph\u1ea7n m\u1ec1m.<\/li>\n\n\n<li><strong>Gi\u00e1m s\u00e1t v\u00e0 b\u00e1o c\u00e1o:<\/strong> thu th\u1eadp s\u1ed1 l\u1ea7n ch\u1ea1y, l\u1ed7i \u0111\u1ec3 \u0111\u01b0a sang h\u1ec7 th\u1ed1ng gi\u00e1m s\u00e1t.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu ch\u1ec9 c\u1ea7n \u1ee9ng d\u1ee5ng kh\u00e1c <em>kh\u1edfi \u0111\u1ed9ng<\/em> m\u1ed9t workflow, d\u00f9ng <a href=\"https:\/\/tino.vn\/blog\/node-webhook-trong-n8n\/\">node Webhook<\/a> s\u1ebd \u0111\u01a1n gi\u1ea3n v\u00e0 an to\u00e0n h\u01a1n. API key d\u00f9ng khi c\u1ea7n \u0111i\u1ec1u khi\u1ec3n ch\u00ednh n8n.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>L\u01b0u \u00fd:<\/strong> n8n API kh\u00f4ng d\u00f9ng \u0111\u01b0\u1ee3c trong th\u1eddi gian d\u00f9ng th\u1eed n8n Cloud (<a href=\"https:\/\/docs.n8n.io\/connect\/n8n-api\/authentication\/\" target=\"_blank\" rel=\"noopener nofollow\">docs: API authentication<\/a>, truy c\u1eadp 22\/10\/2026).<\/p>\n\n\n\n<h2 id=\"C\u00e1ch_t\u1ea1o_API_key_trong_n8n\">C\u00e1ch t\u1ea1o API key trong n8n<\/h2>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_1:_M\u1edf_Settings\">B\u01b0\u1edbc 1: M\u1edf Settings<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">T\u1eeb giao di\u1ec7n n8n, b\u1ea5m v\u00e0o bi\u1ec3u t\u01b0\u1ee3ng t\u00e0i kho\u1ea3n \u1edf g\u00f3c d\u01b0\u1edbi b\u00ean tr\u00e1i v\u00e0 ch\u1ecdn <strong>Settings<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"792\" height=\"472\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-1.png\" alt=\"Menu t\u00e0i kho\u1ea3n \u1edf g\u00f3c d\u01b0\u1edbi b\u00ean tr\u00e1i giao di\u1ec7n n8n v\u1edbi l\u1ef1a ch\u1ecdn Settings v\u00e0 Sign out\" class=\"wp-image-116501\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-1.png 792w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-1-300x179.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-1-768x458.png 768w\" sizes=\"(max-width: 792px) 100vw, 792px\" \/><\/figure>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_2:_Ch\u1ecdn_n8n_API\">B\u01b0\u1edbc 2: Ch\u1ecdn n8n API<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Trong menu Settings, ch\u1ecdn m\u1ee5c <strong>n8n API<\/strong>. \u0110\u00e2y l\u00e0 n\u01a1i qu\u1ea3n l\u00fd c\u00e1c API key \u0111\u00e3 t\u1ea1o. B\u1ea5m <strong>Create an API Key<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1157\" height=\"626\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-2.png\" alt=\"Trang Settings &gt; n8n API li\u1ec7t k\u00ea c\u00e1c API key \u0111\u00e3 t\u1ea1o k\u00e8m ng\u00e0y h\u1ebft h\u1ea1n v\u00e0 n\u00fat Create an API Key\" class=\"wp-image-116502\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-2.png 1157w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-2-300x162.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-2-1024x554.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-2-768x416.png 768w\" sizes=\"(max-width: 1157px) 100vw, 1157px\" \/><\/figure>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_3:_\u0110i\u1ec1n_th\u00f4ng_tin_API_key\">B\u01b0\u1edbc 3: \u0110i\u1ec1n th\u00f4ng tin API key<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Label:<\/strong> t\u00ean d\u1ec5 hi\u1ec3u theo m\u1ee5c \u0111\u00edch, v\u00ed d\u1ee5 &#8220;Backup h\u1eb1ng \u0111\u00eam&#8221;.<\/li>\n\n\n<li><strong>Expiration:<\/strong> th\u1eddi h\u1ea1n c\u1ee7a key (7, 30, 60, 90 ng\u00e0y, t\u00f9y ch\u1ec9nh ho\u1eb7c kh\u00f4ng h\u1ebft h\u1ea1n). N\u00ean ch\u1ecdn th\u1eddi h\u1ea1n v\u1eeba \u0111\u1ee7 d\u00f9ng.<\/li>\n\n\n<li><strong>Scopes:<\/strong> ch\u1ec9 ch\u1ecdn \u0111\u01b0\u1ee3c tr\u00ean g\u00f3i Enterprise. \u1ede c\u00e1c g\u00f3i kh\u00e1c (k\u1ec3 c\u1ea3 b\u1ea3n Community t\u1ef1 host), API key c\u00f3 <strong>to\u00e0n quy\u1ec1n<\/strong> v\u1edbi m\u1ecdi t\u00e0i nguy\u00ean c\u1ee7a t\u00e0i kho\u1ea3n; \u00f4 Scopes hi\u1ec7n th\u00f4ng b\u00e1o Upgrade nh\u01b0 trong \u1ea3nh.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"923\" height=\"549\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-3.png\" alt=\"H\u1ed9p tho\u1ea1i Create API Key trong n8n v\u1edbi Label, Expiration 30 days, danh s\u00e1ch Scopes b\u1ecb kh\u00f3a v\u00e0 th\u00f4ng b\u00e1o Upgrade to unlock\" class=\"wp-image-116503\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-3.png 923w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-3-300x178.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-3-768x457.png 768w\" sizes=\"(max-width: 923px) 100vw, 923px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">B\u1ea5m <strong>Save<\/strong>. API key ch\u1ec9 hi\u1ec7n ra m\u1ed9t l\u1ea7n: sao ch\u00e9p ngay v\u00e0 c\u1ea5t v\u00e0o tr\u00ecnh qu\u1ea3n l\u00fd m\u1eadt kh\u1ea9u, v\u00ec sau khi \u0111\u00f3ng h\u1ed9p tho\u1ea1i b\u1ea1n kh\u00f4ng xem l\u1ea1i \u0111\u01b0\u1ee3c.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"912\" height=\"524\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-tao-api-key-trong-n8n-sua-01.webp\" alt=\"H\u1ed9p tho\u1ea1i API Key Created trong n8n hi\u1ec3n th\u1ecb key v\u1eeba t\u1ea1o (\u0111\u00e3 che) v\u00e0 nh\u1eafc sao ch\u00e9p ngay v\u00ec kh\u00f4ng xem l\u1ea1i \u0111\u01b0\u1ee3c, n\u00fat Done\" class=\"wp-image-131675\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-tao-api-key-trong-n8n-sua-01.webp 912w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-tao-api-key-trong-n8n-sua-01-300x172.webp 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-tao-api-key-trong-n8n-sua-01-768x441.webp 768w\" sizes=\"(max-width: 912px) 100vw, 912px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">B\u1ea5m <strong>Done<\/strong> sau khi \u0111\u00e3 sao ch\u00e9p.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_4:_G\u1ecdi_th\u1eed_n8n_API\">B\u01b0\u1edbc 4: G\u1ecdi th\u1eed n8n API<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">G\u1eedi key trong header <code>X-N8N-API-KEY<\/code>. Base URL c\u00f3 d\u1ea1ng <code>https:\/\/&lt;t\u00ean-mi\u1ec1n-n8n&gt;\/api\/v1<\/code> v\u1edbi b\u1ea3n t\u1ef1 host, ho\u1eb7c <code>https:\/\/&lt;t\u00ean&gt;.app.n8n.cloud\/api\/v1<\/code> v\u1edbi n8n Cloud (<a href=\"https:\/\/docs.n8n.io\/connect\/n8n-api\/authentication\/\" target=\"_blank\" rel=\"noopener nofollow\">docs: API authentication<\/a>). V\u00ed d\u1ee5 l\u1ea5y danh s\u00e1ch workflow:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -X GET \"https:\/\/n8n.example.com\/api\/v1\/workflows\" \\\n  -H \"accept: application\/json\" \\\n  -H \"X-N8N-API-KEY: &lt;API key c\u1ee7a b\u1ea1n&gt;\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Tr\u1ea3 v\u1ec1 JSON danh s\u00e1ch workflow l\u00e0 key ho\u1ea1t \u0111\u1ed9ng. B\u00e1o 401 th\u00ec key sai, \u0111\u00e3 h\u1ebft h\u1ea1n ho\u1eb7c b\u1ecb x\u00f3a.<\/p>\n\n\n\n<h2 id=\"C\u00e1ch_t\u1ea1o_credential_n8n_API_v\u1edbi_API_key\">C\u00e1ch t\u1ea1o credential n8n API v\u1edbi API key<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Mu\u1ed1n workflow trong n8n t\u1ef1 g\u1ecdi n8n API (v\u00ed d\u1ee5 workflow sao l\u01b0u ch\u00ednh n\u00f3), t\u1ea1o m\u1ed9t credential lo\u1ea1i n8n API \u0111\u1ec3 node n8n d\u00f9ng:<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_1:_M\u1edf_h\u1ed9p_tho\u1ea1i_t\u1ea1o_credential\">B\u01b0\u1edbc 1: M\u1edf h\u1ed9p tho\u1ea1i t\u1ea1o credential<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">B\u1ea5m n\u00fat <strong>Create<\/strong> r\u1ed3i ch\u1ecdn <strong>Credential<\/strong> (\u1edf b\u1ea3n 1.x l\u00e0 m\u0169i t\u00ean c\u1ea1nh n\u00fat Create Workflow > Create Credential).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"665\" height=\"398\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-5.png\" alt=\"N\u00fat Create Workflow trong n8n m\u1edf menu v\u1edbi l\u1ef1a ch\u1ecdn Create Credential\" class=\"wp-image-116505\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-5.png 665w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-5-300x180.png 300w\" sizes=\"(max-width: 665px) 100vw, 665px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><em>\u1ea2nh ch\u1ee5p \u1edf b\u1ea3n n8n 1.x (c\u00f2n c\u00f4ng t\u1eafc Inactive). \u1ede n8n 2.x, n\u00fat Create n\u1eb1m \u1edf g\u00f3c tr\u00ean b\u00ean tr\u00e1i thanh menu v\u00e0 workflow d\u00f9ng n\u00fat Publish.<\/em><\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_2:_Ch\u1ecdn_n8n_API\">B\u01b0\u1edbc 2: Ch\u1ecdn n8n API<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Trong h\u1ed9p tho\u1ea1i <strong>Add new credential<\/strong>, t\u00ecm v\u00e0 ch\u1ecdn <strong>n8n API<\/strong>, b\u1ea5m <strong>Continue<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"722\" height=\"410\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-6.png\" alt=\"H\u1ed9p tho\u1ea1i Add new credential trong n8n, \u00f4 t\u00ecm ki\u1ebfm nh\u1eadp n8n API v\u00e0 n\u00fat Continue\" class=\"wp-image-116506\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-6.png 722w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/07\/word-image-116500-6-300x170.png 300w\" sizes=\"(max-width: 722px) 100vw, 722px\" \/><\/figure>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_3:_\u0110i\u1ec1n_th\u00f4ng_tin_credential\">B\u01b0\u1edbc 3: \u0110i\u1ec1n th\u00f4ng tin credential<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>T\u00ean credential:<\/strong> b\u1ea5m v\u00e0o t\u00ean \u1edf \u0111\u1ea7u h\u1ed9p tho\u1ea1i \u0111\u1ec3 \u0111\u1ed5i, v\u00ed d\u1ee5 &#8220;n8n API &#8211; backup&#8221;.<\/li>\n\n\n<li><strong>API Key:<\/strong> d\u00e1n key v\u1eeba sao ch\u00e9p \u1edf ph\u1ea7n tr\u00ean.<\/li>\n\n\n<li><strong>Base URL:<\/strong> \u0111\u1ecba ch\u1ec9 instance k\u00e8m <code>\/api\/v1<\/code>, v\u00ed d\u1ee5 <code>https:\/\/n8n.example.com\/api\/v1<\/code>.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1042\" height=\"584\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-tao-api-key-trong-n8n-sua-02.webp\" alt=\"Credential Test n8n API trong n8n v\u1edbi \u00f4 API Key \u0111\u00e3 \u1ea9n v\u00e0 Base URL d\u1ea1ng https:\/\/t\u00ean-mi\u1ec1n\/api\/v1 (t\u00ean mi\u1ec1n \u0111\u00e3 che), n\u00fat Save\" class=\"wp-image-131676\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-tao-api-key-trong-n8n-sua-02.webp 1042w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-tao-api-key-trong-n8n-sua-02-300x168.webp 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-tao-api-key-trong-n8n-sua-02-1024x574.webp 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-tao-api-key-trong-n8n-sua-02-768x430.webp 768w\" sizes=\"(max-width: 1042px) 100vw, 1042px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">B\u1ea5m <strong>Save<\/strong>. T\u1eeb gi\u1edd node n8n trong workflow d\u00f9ng credential n\u00e0y \u0111\u1ec3 \u0111\u1ecdc, t\u1ea1o workflow, execution, credential qua API.<\/p>\n\n\n\n<h2 id=\"Nh\u1eefng_l\u01b0u_\u00fd_khi_t\u1ea1o_API_key_n8n\">Nh\u1eefng l\u01b0u \u00fd khi t\u1ea1o API key n8n<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Label r\u00f5 r\u00e0ng:<\/strong> m\u1ed7i key m\u1ed9t m\u1ee5c \u0111\u00edch, \u0111\u1eb7t t\u00ean theo m\u1ee5c \u0111\u00edch \u0111\u1ec3 bi\u1ebft key n\u00e0o c\u1ea7n thu h\u1ed3i.<\/li>\n\n\n<li><strong>Expiration ng\u1eafn:<\/strong> tr\u00e1nh key kh\u00f4ng h\u1ebft h\u1ea1n n\u1ebfu kh\u00f4ng th\u1eadt c\u1ea7n, \u0111\u1eb7c bi\u1ec7t khi key c\u00f3 to\u00e0n quy\u1ec1n.<\/li>\n\n\n<li><strong>Scopes (ch\u1ec9 Enterprise):<\/strong> n\u1ebfu c\u00f3 Scopes, c\u1ea5p quy\u1ec1n t\u1ed1i thi\u1ec3u, v\u00ed d\u1ee5 ch\u1ec9 <code>workflow:read<\/code> cho script b\u00e1o c\u00e1o.<\/li>\n\n\n<li><strong>L\u01b0u tr\u1eef an to\u00e0n:<\/strong> key ch\u1ec9 hi\u1ec3n th\u1ecb m\u1ed9t l\u1ea7n; kh\u00f4ng d\u00e1n v\u00e0o m\u00e3 ngu\u1ed3n, kh\u00f4ng g\u1eedi qua chat, kh\u00f4ng ch\u1ee5p m\u00e0n h\u00ecnh \u0111\u1ec3 l\u1ed9 key.<\/li>\n\n\n<li><strong>R\u00e0 so\u00e1t \u0111\u1ecbnh k\u1ef3:<\/strong> x\u00f3a key kh\u00f4ng d\u00f9ng n\u1eefa ho\u1eb7c \u0111\u00e3 l\u1ed9.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Mu\u1ed1n ch\u1ea1y n8n 24\/7 m\u00e0 kh\u00f4ng t\u1ef1 c\u00e0i? <a href=\"https:\/\/tino.vn\/vps-n8n\">VPS n8n c\u1ee7a Tino<\/a> c\u00e0i s\u1eb5n n8n tr\u00ean VPS NVMe \u0111\u1eb7t t\u1ea1i Vi\u1ec7t Nam; b\u1ea1n v\u1eabn c\u00f3 quy\u1ec1n root \u0111\u1ec3 c\u1ea5u h\u00ecnh. Xem c\u1ea5u h\u00ecnh v\u00e0 gi\u00e1 tr\u00ean trang s\u1ea3n ph\u1ea9m.<\/p>\n\n\n\n<h2 id=\"K\u1ebft_lu\u1eadn\">K\u1ebft lu\u1eadn<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">T\u1ea1o API key n8n ch\u1ec9 m\u1ea5t v\u00e0i thao t\u00e1c \u1edf Settings > n8n API. \u0110i\u1ec1u c\u1ea7n nh\u1edb: key \u1edf g\u00f3i kh\u00f4ng ph\u1ea3i Enterprise c\u00f3 to\u00e0n quy\u1ec1n, n\u00ean \u0111\u1eb7t h\u1ea1n d\u00f9ng ng\u1eafn, c\u1ea5t key c\u1ea9n th\u1eadn v\u00e0 x\u00f3a ngay khi kh\u00f4ng d\u00f9ng.<\/p>\n\n\n\n<h2 id=\"Nh\u1eefng_c\u00e2u_h\u1ecfi_th\u01b0\u1eddng_g\u1eb7p\">Nh\u1eefng c\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p<\/h2>\n\n\n\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"C\u00f3_th\u1ec3_t\u1ea1o_bao_nhi\u00eau_API_key?\">C\u00f3 th\u1ec3 t\u1ea1o bao nhi\u00eau API key?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">T\u00e0i li\u1ec7u n8n kh\u00f4ng n\u00eau gi\u1edbi h\u1ea1n s\u1ed1 key. N\u00ean t\u1ea1o m\u1ed7i key cho m\u1ed9t m\u1ee5c \u0111\u00edch \u0111\u1ec3 thu h\u1ed3i ri\u00eang khi c\u1ea7n.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"C\u00f3_thay_\u0111\u1ed5i_scopes_c\u1ee7a_API_key_\u0111\u00e3_t\u1ea1o_\u0111\u01b0\u1ee3c_kh\u00f4ng?\">C\u00f3 thay \u0111\u1ed5i scopes c\u1ee7a API key \u0111\u00e3 t\u1ea1o \u0111\u01b0\u1ee3c kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">Scopes ch\u1ec9 c\u00f3 tr\u00ean g\u00f3i Enterprise. Mu\u1ed1n \u0111\u1ed5i quy\u1ec1n, t\u1ea1o key m\u1edbi v\u1edbi scope mong mu\u1ed1n, c\u1eadp nh\u1eadt n\u01a1i d\u00f9ng r\u1ed3i x\u00f3a key c\u0169.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"L\u00e0m_th\u1ebf_n\u00e0o_\u0111\u1ec3_thu_h\u1ed3i_m\u1ed9t_API_key?\">L\u00e0m th\u1ebf n\u00e0o \u0111\u1ec3 thu h\u1ed3i m\u1ed9t API key?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">V\u00e0o Settings > n8n API, ch\u1ecdn Delete c\u1ea1nh key c\u1ea7n thu h\u1ed3i v\u00e0 x\u00e1c nh\u1eadn. \u1ee8ng d\u1ee5ng ho\u1eb7c script \u0111ang d\u00f9ng key \u0111\u00f3 s\u1ebd nh\u1eadn l\u1ed7i 401 ngay sau \u0111\u00f3.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"\u0110i\u1ec1u_g\u00ec_x\u1ea3y_ra_khi_API_key_h\u1ebft_h\u1ea1n?\">\u0110i\u1ec1u g\u00ec x\u1ea3y ra khi API key h\u1ebft h\u1ea1n?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">Key h\u1ebft h\u1ea1n kh\u00f4ng x\u00e1c th\u1ef1c \u0111\u01b0\u1ee3c n\u1eefa; m\u1ecdi request d\u00f9ng key tr\u1ea3 401. T\u1ea1o key m\u1edbi v\u00e0 c\u1eadp nh\u1eadt v\u00e0o \u1ee9ng d\u1ee5ng ho\u1eb7c credential n8n API.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"API_key_n8n_kh\u00e1c_credential_th\u1ebf_n\u00e0o?\">API key n8n kh\u00e1c credential th\u1ebf n\u00e0o?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">API key l\u00e0 kh\u00f3a \u0111\u1ec3 b\u00ean ngo\u00e0i g\u1ecdi v\u00e0o n8n. Credential l\u00e0 n\u01a1i n8n l\u01b0u kh\u00f3a c\u1ee7a d\u1ecbch v\u1ee5 kh\u00e1c \u0111\u1ec3 g\u1ecdi ra ngo\u00e0i. Xem <a href=\"https:\/\/tino.vn\/blog\/credential-trong-n8n-la-gi\/\">credential trong n8n l\u00e0 g\u00ec<\/a>.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\n<script type=\"application\/ld+json\">\n\t{\n\t\t\"@context\": \"https:\/\/schema.org\",\n\t\t\"@type\": \"FAQPage\",\n\t\t\"mainEntity\": [\n\t\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"C\u00f3 th\u1ec3 t\u1ea1o bao nhi\u00eau API key?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>T\u00e0i li\u1ec7u n8n kh\u00f4ng n\u00eau gi\u1edbi h\u1ea1n s\u1ed1 key. N\u00ean t\u1ea1o m\u1ed7i key cho m\u1ed9t m\u1ee5c \u0111\u00edch \u0111\u1ec3 thu h\u1ed3i ri\u00eang khi c\u1ea7n.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"C\u00f3 thay \u0111\u1ed5i scopes c\u1ee7a API key \u0111\u00e3 t\u1ea1o \u0111\u01b0\u1ee3c kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Scopes ch\u1ec9 c\u00f3 tr\u00ean g\u00f3i Enterprise. Mu\u1ed1n \u0111\u1ed5i quy\u1ec1n, t\u1ea1o key m\u1edbi v\u1edbi scope mong mu\u1ed1n, c\u1eadp nh\u1eadt n\u01a1i d\u00f9ng r\u1ed3i x\u00f3a key c\u0169.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"L\u00e0m th\u1ebf n\u00e0o \u0111\u1ec3 thu h\u1ed3i m\u1ed9t API key?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>V\u00e0o Settings > n8n API, ch\u1ecdn Delete c\u1ea1nh key c\u1ea7n thu h\u1ed3i v\u00e0 x\u00e1c nh\u1eadn. \u1ee8ng d\u1ee5ng ho\u1eb7c script \u0111ang d\u00f9ng key \u0111\u00f3 s\u1ebd nh\u1eadn l\u1ed7i 401 ngay sau \u0111\u00f3.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"\u0110i\u1ec1u g\u00ec x\u1ea3y ra khi API key h\u1ebft h\u1ea1n?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Key h\u1ebft h\u1ea1n kh\u00f4ng x\u00e1c th\u1ef1c \u0111\u01b0\u1ee3c n\u1eefa; m\u1ecdi request d\u00f9ng key tr\u1ea3 401. T\u1ea1o key m\u1edbi v\u00e0 c\u1eadp nh\u1eadt v\u00e0o \u1ee9ng d\u1ee5ng ho\u1eb7c credential n8n API.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"API key n8n kh\u00e1c credential th\u1ebf n\u00e0o?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>API key l\u00e0 kh\u00f3a \u0111\u1ec3 b\u00ean ngo\u00e0i g\u1ecdi v\u00e0o n8n. Credential l\u00e0 n\u01a1i n8n l\u01b0u kh\u00f3a c\u1ee7a d\u1ecbch v\u1ee5 kh\u00e1c \u0111\u1ec3 g\u1ecdi ra ngo\u00e0i. Xem <a>credential trong n8n l\u00e0 g\u00ec<\/a>.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t]\n\t}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>API key c\u1ee7a n8n d\u00f9ng \u0111\u1ec3 g\u1ecdi n8n public API t\u1eeb b\u00ean ngo\u00e0i, v\u00ed d\u1ee5 li\u1ec7t k\u00ea, t\u1ea1o ho\u1eb7c publish workflow b\u1eb1ng script. T\u1ea1o key t\u1ea1i Settings > n8n API > Create an API key, \u0111\u1eb7t Label v\u00e0 Expiration, sao ch\u00e9p key ngay v\u00ec n8n ch\u1ec9 hi\u1ec3n th\u1ecb m\u1ed9t l\u1ea7n, r\u1ed3i g\u1eedi key trong header [&hellip;]<\/p>\n","protected":false},"author":23,"featured_media":116511,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7397],"tags":[7343],"class_list":["post-116500","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-n8n","tag-n8n"],"_links":{"self":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/116500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/comments?post=116500"}],"version-history":[{"count":2,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/116500\/revisions"}],"predecessor-version":[{"id":131707,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/116500\/revisions\/131707"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media\/116511"}],"wp:attachment":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media?parent=116500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/categories?post=116500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/tags?post=116500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}