{"id":104998,"date":"2025-04-28T10:56:56","date_gmt":"2025-04-28T03:56:56","guid":{"rendered":"https:\/\/wiki.tino.org\/?p=104998"},"modified":"2026-10-23T18:29:44","modified_gmt":"2026-10-23T11:29:44","slug":"cach-them-api-vao-n8n","status":"publish","type":"post","link":"https:\/\/tino.vn\/blog\/cach-them-api-vao-n8n\/","title":{"rendered":"C\u00e1ch th\u00eam API v\u00e0o n8n b\u1eb1ng node HTTP Request (h\u01b0\u1edbng d\u1eabn chi ti\u1ebft)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u0110\u1ec3 g\u1ecdi m\u1ed9t API trong n8n, b\u1ea1n th\u00eam node <strong>HTTP Request<\/strong>, ch\u1ecdn method (GET, POST&#8230;), nh\u1eadp URL endpoint, r\u1ed3i c\u1ea5u h\u00ecnh x\u00e1c th\u1ef1c b\u1eb1ng credential thay v\u00ec d\u00e1n API key v\u00e0o URL. C\u00e1ch nhanh nh\u1ea5t l\u00e0 d\u00f9ng <strong>Import cURL<\/strong>: d\u00e1n l\u1ec7nh curl t\u1eeb t\u00e0i li\u1ec7u API, n8n t\u1ef1 \u0111i\u1ec1n URL, header v\u00e0 body.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">B\u00e0i n\u00e0y h\u01b0\u1edbng d\u1eabn g\u1ecdi <em>API b\u00ean ngo\u00e0i<\/em> t\u1eeb workflow <a href=\"https:\/\/tino.vn\/blog\/n8n-la-gi\/\">n8n<\/a>, thu\u1ed9c lo\u1ea1t <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>. N\u1ebfu b\u1ea1n c\u1ea7n API c\u1ee7a ch\u00ednh n8n (\u0111\u1ec3 qu\u1ea3n l\u00fd workflow t\u1eeb b\u00ean ngo\u00e0i), xem b\u00e0i <a href=\"https:\/\/tino.vn\/blog\/cach-tao-api-key-trong-n8n\/\">c\u00e1ch t\u1ea1o API key trong n8n<\/a>. N\u1ed9i dung theo n8n 2.x, \u0111\u1ed1i chi\u1ebfu <a href=\"https:\/\/docs.n8n.io\/integrations\/builtin\/core-nodes\/n8n-nodes-base.httprequest\/\" target=\"_blank\" rel=\"noopener nofollow\">t\u00e0i li\u1ec7u node HTTP Request<\/a> ng\u00e0y 23\/10\/2026.<\/p>\n\n\n\n<h2 id=\"API_l\u00e0_g\u00ec_v\u00e0_v\u00ec_sao_n8n_c\u1ea7n_node_HTTP_Request?\">API l\u00e0 g\u00ec v\u00e0 v\u00ec sao n8n c\u1ea7n node HTTP Request?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">API (Application Programming Interface) l\u00e0 t\u1eadp quy t\u1eafc \u0111\u1ec3 hai ph\u1ea7n m\u1ec1m trao \u0111\u1ed5i d\u1eef li\u1ec7u: b\u00ean g\u1ecdi g\u1eedi <strong>request<\/strong> t\u1edbi m\u1ed9t <strong>endpoint<\/strong>, b\u00ean kia tr\u1ea3 <strong>response<\/strong>, th\u01b0\u1eddng \u1edf d\u1ea1ng JSON. V\u00ed d\u1ee5, \u1ee9ng d\u1ee5ng b\u00e1n h\u00e0ng g\u1ecdi API c\u1ee7a c\u1ed5ng thanh to\u00e1n \u0111\u1ec3 x\u1eed l\u00fd giao d\u1ecbch, r\u1ed3i g\u1ecdi API c\u1ee7a \u0111\u01a1n v\u1ecb v\u1eadn chuy\u1ec3n \u0111\u1ec3 c\u1eadp nh\u1eadt tr\u1ea1ng th\u00e1i \u0111\u01a1n.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">n8n c\u00f3 h\u00e0ng tr\u0103m node d\u1ef1ng s\u1eb5n cho Google Sheets, Slack, Telegram&#8230; nh\u01b0ng kh\u00f4ng ph\u1ea3i d\u1ecbch v\u1ee5 n\u00e0o c\u0169ng c\u00f3 node. Node HTTP Request l\u1ea5p ch\u1ed7 tr\u1ed1ng \u0111\u00f3: b\u1ea1n g\u1ecdi \u0111\u01b0\u1ee3c m\u1ecdi REST API, t\u1ef1 ch\u1ecdn URL, header, tham s\u1ed1 v\u00e0 body theo t\u00e0i li\u1ec7u c\u1ee7a d\u1ecbch v\u1ee5.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>K\u1ebft n\u1ed1i d\u1ecbch v\u1ee5 ch\u01b0a c\u00f3 node:<\/strong> h\u1ec7 th\u1ed1ng n\u1ed9i b\u1ed9, d\u1ecbch v\u1ee5 m\u1edbi, endpoint m\u00e0 node d\u1ef1ng s\u1eb5n ch\u01b0a h\u1ed7 tr\u1ee3.<\/li>\n\n\n<li><strong>Chuy\u1ec3n d\u1eef li\u1ec7u t\u1ef1 \u0111\u1ed9ng:<\/strong> l\u1ea5y d\u1eef li\u1ec7u t\u1eeb h\u1ec7 th\u1ed1ng A r\u1ed3i g\u1eedi sang h\u1ec7 th\u1ed1ng B, v\u00ed d\u1ee5 l\u1ea5y \u0111\u01a1n h\u00e0ng r\u1ed3i ghi v\u00e0o Google Sheets.<\/li>\n\n\n<li><strong>T\u00f9y ch\u1ec9nh request:<\/strong> ch\u1ecdn method, header, query, body \u0111\u00fang nh\u01b0 API y\u00eau c\u1ea7u.<\/li>\n<\/ul>\n\n\n\n<h2 id=\"C\u00e1c_th\u00e0nh_ph\u1ea7n_c\u1ea5u_h\u00ecnh_c\u1ee7a_node_HTTP_Request\">C\u00e1c th\u00e0nh ph\u1ea7n c\u1ea5u h\u00ecnh c\u1ee7a node HTTP Request<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Node HTTP Request c\u00f3 s\u00e1u nh\u00f3m c\u1ea5u h\u00ecnh: Method, URL, Authentication, Query Parameters, Headers v\u00e0 Body, c\u1ed9ng th\u00eam Options v\u00e0 Settings. Ba nh\u00f3m \u0111\u1ea7u l\u00e0 b\u1eaft bu\u1ed9c v\u1edbi m\u1ecdi API; c\u00e1c nh\u00f3m sau t\u00f9y t\u00e0i li\u1ec7u c\u1ee7a d\u1ecbch v\u1ee5 b\u1ea1n g\u1ecdi.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Th\u00e0nh ph\u1ea7n<\/th><th>\u00dd ngh\u0129a<\/th><th>V\u00ed d\u1ee5<\/th><\/tr><\/thead><tbody><tr><td>Method<\/td><td>H\u00e0nh \u0111\u1ed9ng mu\u1ed1n l\u00e0m v\u1edbi API<\/td><td>GET l\u1ea5y d\u1eef li\u1ec7u, POST t\u1ea1o m\u1edbi, PUT\/PATCH c\u1eadp nh\u1eadt, DELETE x\u00f3a<\/td><\/tr><tr><td>URL<\/td><td>\u0110\u1ecba ch\u1ec9 endpoint, c\u00f3 th\u1ec3 d\u00f9ng expression l\u1ea5y t\u1eeb node tr\u01b0\u1edbc<\/td><td><code>https:\/\/api.pexels.com\/v1\/search<\/code><\/td><\/tr><tr><td>Authentication<\/td><td>C\u00e1ch ch\u1ee9ng minh b\u1ea1n \u0111\u01b0\u1ee3c ph\u00e9p g\u1ecdi API<\/td><td>None, Predefined Credential Type, Generic Credential Type<\/td><\/tr><tr><td>Query Parameters<\/td><td>Tham s\u1ed1 l\u1ecdc g\u1eafn sau d\u1ea5u ? c\u1ee7a URL<\/td><td><code>query=coffee<\/code>, <code>per_page=3<\/code><\/td><\/tr><tr><td>Headers<\/td><td>Th\u00f4ng tin g\u1eedi k\u00e8m request<\/td><td><code>Content-Type: application\/json<\/code><\/td><\/tr><tr><td>Body<\/td><td>D\u1eef li\u1ec7u g\u1eedi \u0111i v\u1edbi POST, PUT, PATCH<\/td><td>JSON, form-data, file nh\u1ecb ph\u00e2n<\/td><\/tr><tr><td>Options<\/td><td>Batching, Pagination, Timeout, Response format, Ignore SSL Issues<\/td><td>Timeout t\u00ednh b\u1eb1ng mili gi\u00e2y<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">C\u00e1c tr\u01b0\u1eddng ch\u00ednh c\u1ee7a node HTTP Request (docs.n8n.io, truy c\u1eadp 23\/10\/2026)<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">URL c\u00f3 th\u1ec3 l\u1ea5y gi\u00e1 tr\u1ecb t\u1eeb node kh\u00e1c b\u1eb1ng expression. C\u00fa ph\u00e1p hi\u1ec7n h\u00e0nh l\u00e0 <code>{{ $('T\u00ean node').item.json.url }}<\/code>; c\u00e1ch vi\u1ebft c\u0169 <code>$node[\"T\u00ean node\"].json[\"url\"]<\/code> v\u1eabn ch\u1ea1y nh\u01b0ng kh\u00f4ng c\u00f2n \u0111\u01b0\u1ee3c khuy\u00ean d\u00f9ng (<a href=\"https:\/\/docs.n8n.io\/build\/work-with-data\/reference-data\/reference-previous-nodes\/\" target=\"_blank\" rel=\"noopener nofollow\">Reference previous nodes<\/a>). N\u1ebfu ch\u1ec9 c\u1ea7n d\u1eef li\u1ec7u c\u1ee7a node ngay tr\u01b0\u1edbc, vi\u1ebft g\u1ecdn <code>{{ $json.url }}<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Ignore SSL Issues<\/strong> ch\u1ec9 d\u00f9ng khi th\u1eed v\u1edbi m\u00e1y ch\u1ee7 n\u1ed9i b\u1ed9 c\u00f3 ch\u1ee9ng ch\u1ec9 t\u1ef1 k\u00fd. V\u1edbi API th\u1eadt tr\u00ean Internet, t\u1eaft t\u00f9y ch\u1ecdn n\u00e0y \u0111\u1ec3 n8n ki\u1ec3m ch\u1ee9ng ch\u1ec9.<\/p>\n\n\n\n<h2 id=\"C\u00e1ch_nhanh_nh\u1ea5t:_Import_cURL\">C\u00e1ch nhanh nh\u1ea5t: Import cURL<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Import cURL l\u00e0 n\u00fat \u1edf \u0111\u1ea7u node HTTP Request cho ph\u00e9p d\u00e1n l\u1ec7nh curl t\u1eeb t\u00e0i li\u1ec7u API; n8n t\u1ef1 \u0111i\u1ec1n method, URL, header, query v\u00e0 body. \u0110\u00e2y l\u00e0 c\u00e1ch \u00edt sai nh\u1ea5t khi t\u00e0i li\u1ec7u API c\u00f3 s\u1eb5n v\u00ed d\u1ee5 curl.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>M\u1edf node HTTP Request, b\u1ea5m <strong>Import cURL<\/strong>.<\/li>\n\n\n<li>D\u00e1n l\u1ec7nh curl, v\u00ed d\u1ee5 l\u1ec7nh t\u00ecm \u1ea3nh c\u1ee7a Pexels b\u00ean d\u01b0\u1edbi, r\u1ed3i b\u1ea5m Import.<\/li>\n\n\n<li>Ki\u1ec3m l\u1ea1i c\u00e1c tr\u01b0\u1eddng v\u1eeba \u0111\u01b0\u1ee3c \u0111i\u1ec1n. N\u1ebfu l\u1ec7nh c\u00f3 header ch\u1ee9a kh\u00f3a (Authorization, X-API-Key), x\u00f3a header \u0111\u00f3 v\u00e0 chuy\u1ec3n kh\u00f3a sang credential \u1edf b\u01b0\u1edbc x\u00e1c th\u1ef1c.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -H \"Authorization: YOUR_PEXELS_API_KEY\" \\\n  \"https:\/\/api.pexels.com\/v1\/search?query=coffee&amp;per_page=3\"<\/code><\/pre>\n\n\n\n<h2 id=\"V\u00ed_d\u1ee5:_g\u1ecdi_Pexels_API_\u0111\u1ec3_t\u00ecm_\u1ea3nh_b\u1eb1ng_HTTP_Request\">V\u00ed d\u1ee5: g\u1ecdi Pexels API \u0111\u1ec3 t\u00ecm \u1ea3nh b\u1eb1ng HTTP Request<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">V\u00ed d\u1ee5 d\u01b0\u1edbi \u0111\u00e2y t\u00ecm 3 \u1ea3nh mi\u1ec5n ph\u00ed v\u1edbi t\u1eeb kh\u00f3a &#8220;coffee&#8221; t\u1eeb Pexels API. \u1ea2nh ch\u1ee5p l\u00e0m tr\u00ean n8n b\u1ea3n 1.x: n\u00fat <strong>Test step<\/strong> trong \u1ea3nh nay l\u00e0 <strong>Execute step<\/strong>, c\u00f4ng t\u1eafc Inactive nay l\u00e0 n\u00fat Publish; c\u00e1c tr\u01b0\u1eddng c\u1ea5u h\u00ecnh gi\u1eef nguy\u00ean.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_1:_L\u1ea5y_API_key_c\u1ee7a_Pexels\">B\u01b0\u1edbc 1: L\u1ea5y API key c\u1ee7a Pexels<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Truy c\u1eadp <a href=\"https:\/\/www.pexels.com\/api\/\" target=\"_blank\" rel=\"noopener nofollow\">pexels.com\/api<\/a>, \u0111\u0103ng nh\u1eadp ho\u1eb7c t\u1ea1o t\u00e0i kho\u1ea3n.<\/li>\n\n\n<li>Ch\u1ecdn <strong>Your API Key<\/strong>, \u0111i\u1ec1n th\u00f4ng tin theo y\u00eau c\u1ea7u \u0111\u1ec3 nh\u1eadn kh\u00f3a.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"965\" height=\"584\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-6.png\" alt=\"Trang Pexels API v\u1edbi n\u00fat Your API Key v\u00e0 Documentation \u0111\u1ec3 l\u1ea5y kh\u00f3a API mi\u1ec5n ph\u00ed\" class=\"wp-image-105004\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-6.png 965w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-6-300x182.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-6-768x465.png 768w\" sizes=\"(max-width: 965px) 100vw, 965px\" \/><\/figure>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_2:_Th\u00eam_node_HTTP_Request_v\u00e0o_workflow\">B\u01b0\u1edbc 2: Th\u00eam node HTTP Request v\u00e0o workflow<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">M\u1edf workflow, b\u1ea5m + v\u00e0 t\u00ecm &#8220;http&#8221;, ch\u1ecdn <strong>HTTP Request<\/strong>. B\u1ea3ng c\u1ea5u h\u00ecnh node xu\u1ea5t hi\u1ec7n.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1270\" height=\"711\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-7.png\" alt=\"T\u00ecm t\u1eeb kh\u00f3a http trong b\u1ea3ng ch\u1ecdn node c\u1ee7a n8n v\u00e0 ch\u1ecdn node HTTP Request\" class=\"wp-image-105005\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-7.png 1270w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-7-300x168.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-7-1024x573.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-7-768x430.png 768w\" sizes=\"(max-width: 1270px) 100vw, 1270px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1076\" height=\"872\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-8.png\" alt=\"B\u1ea3ng c\u1ea5u h\u00ecnh node HTTP Request trong n8n: Import cURL, Method GET, URL, Authentication None, Send Query Parameters, Send Headers, Send Body, Options\" class=\"wp-image-105006\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-8.png 1076w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-8-300x243.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-8-1024x830.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-8-768x622.png 768w\" sizes=\"(max-width: 1076px) 100vw, 1076px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">B\u00e0i ch\u1ec9 h\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh node HTTP Request. Ph\u00eda tr\u01b0\u1edbc node n\u00e0y c\u00f3 th\u1ec3 l\u00e0 b\u1ea5t k\u1ef3 trigger hay node n\u00e0o cung c\u1ea5p d\u1eef li\u1ec7u:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Node \u0111\u1ee9ng tr\u01b0\u1edbc HTTP Request<\/th><th>Khi n\u00e0o d\u00f9ng<\/th><\/tr><\/thead><tbody><tr><td><a href=\"https:\/\/tino.vn\/blog\/node-webhook-trong-n8n\/\">Webhook<\/a><\/td><td>Khi d\u1eef li\u1ec7u \u0111\u1ebfn t\u1eeb h\u1ec7 th\u1ed1ng b\u00ean ngo\u00e0i<\/td><\/tr><tr><td>Schedule Trigger<\/td><td>Khi mu\u1ed1n g\u1ecdi API theo gi\u1edd<\/td><\/tr><tr><td>Manual Trigger<\/td><td>Khi ch\u1ea1y th\u1eed ho\u1eb7c ch\u1ea1y th\u1ee7 c\u00f4ng<\/td><\/tr><tr><td>Edit Fields (Set)<\/td><td>Khi mu\u1ed1n truy\u1ec1n gi\u00e1 tr\u1ecb c\u1ed1 \u0111\u1ecbnh, v\u00ed d\u1ee5 t\u1eeb kh\u00f3a t\u00ecm ki\u1ebfm<\/td><\/tr><tr><td>Google Sheets, Airtable<\/td><td>Khi d\u1eef li\u1ec7u \u0111\u1ea7u v\u00e0o n\u1eb1m s\u1eb5n trong b\u1ea3ng<\/td><\/tr><tr><td>HTTP Request kh\u00e1c<\/td><td>Khi c\u1ea7n g\u1ecdi nhi\u1ec1u API n\u1ed1i ti\u1ebfp<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_3:_L\u1ea5y_endpoint_trong_t\u00e0i_li\u1ec7u_Pexels\">B\u01b0\u1edbc 3: L\u1ea5y endpoint trong t\u00e0i li\u1ec7u Pexels<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Tr\u00ean trang Pexels API, ch\u1ecdn <strong>Documentation<\/strong>, m\u1ee5c <strong>Search for Photos<\/strong>. Endpoint t\u00ecm \u1ea3nh l\u00e0:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GET https:\/\/api.pexels.com\/v1\/search<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1110\" height=\"672\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-10.png\" alt=\"T\u00e0i li\u1ec7u Pexels API m\u1ee5c Search for Photos v\u1edbi endpoint GET https:\/\/api.pexels.com\/v1\/search v\u00e0 tham s\u1ed1 query b\u1eaft bu\u1ed9c\" class=\"wp-image-105008\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-10.png 1110w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-10-300x182.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-10-1024x620.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-10-768x465.png 768w\" sizes=\"(max-width: 1110px) 100vw, 1110px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Trong node HTTP Request, ch\u1ecdn <strong>Method<\/strong> GET v\u00e0 nh\u1eadp URL k\u00e8m tham s\u1ed1:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:\/\/api.pexels.com\/v1\/search?query=coffee&amp;per_page=3<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"925\" height=\"527\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-11.png\" alt=\"Node HTTP Request trong n8n v\u1edbi Method GET v\u00e0 URL api.pexels.com\/v1\/search?query=coffee&amp;per_page=3\" class=\"wp-image-105009\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-11.png 925w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-11-300x171.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-11-768x438.png 768w\" sizes=\"(max-width: 925px) 100vw, 925px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">URL n\u00e0y c\u1ea7n header x\u00e1c th\u1ef1c, n\u00ean m\u1edf tr\u1ef1c ti\u1ebfp tr\u00ean tr\u00ecnh duy\u1ec7t s\u1ebd nh\u1eadn l\u1ed7i 401. <code>query<\/code> v\u00e0 <code>per_page<\/code> l\u00e0 Query Parameters, xem B\u01b0\u1edbc 5.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_4:_G\u1eedi_API_key_trong_header\">B\u01b0\u1edbc 4: G\u1eedi API key trong header<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Pexels y\u00eau c\u1ea7u g\u1eedi kh\u00f3a trong header <code>Authorization<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"751\" height=\"430\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-12.png\" alt=\"T\u00e0i li\u1ec7u Pexels: m\u1ecdi request c\u1ea7n g\u1eedi API key trong header Authorization\" class=\"wp-image-105010\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-12.png 751w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-12-300x172.png 300w\" sizes=\"(max-width: 751px) 100vw, 751px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">C\u00e1ch nhanh \u0111\u1ec3 th\u1eed: b\u1eadt <strong>Send Headers<\/strong>, Name nh\u1eadp <code>Authorization<\/code>, Value d\u00e1n API key. C\u00e1ch n\u00ean d\u00f9ng khi ch\u1ea1y th\u1eadt: Authentication ch\u1ecdn <strong>Generic Credential Type<\/strong> \u2192 <strong>Header Auth<\/strong>, t\u1ea1o credential v\u1edbi Name <code>Authorization<\/code> v\u00e0 Value l\u00e0 kh\u00f3a. Kh\u00f3a \u0111\u01b0\u1ee3c l\u01b0u m\u00e3 h\u00f3a, kh\u00f4ng hi\u1ec7n trong node v\u00e0 kh\u00f4ng \u0111i theo file khi export workflow.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"877\" height=\"530\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-them-api-vao-n8n-sua-01.webp\" alt=\"Node HTTP Request b\u1eadt Send Headers, Header Parameters Name l\u00e0 Authorization, Value l\u00e0 API key Pexels \u0111\u00e3 \u0111\u01b0\u1ee3c che\" class=\"wp-image-131679\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-them-api-vao-n8n-sua-01.webp 877w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-them-api-vao-n8n-sua-01-300x181.webp 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-them-api-vao-n8n-sua-01-768x464.webp 768w\" sizes=\"(max-width: 877px) 100vw, 877px\" \/><\/figure>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_5:_T\u00f9y_ch\u1ec9nh_Query_Parameters\">B\u01b0\u1edbc 5: T\u00f9y ch\u1ec9nh Query Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Pexels h\u1ed7 tr\u1ee3 c\u00e1c tham s\u1ed1 sau cho endpoint Search:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Tham s\u1ed1<\/th><th>\u00dd ngh\u0129a<\/th><th>V\u00ed d\u1ee5<\/th><\/tr><\/thead><tbody><tr><td><code>query<\/code><\/td><td>T\u1eeb kh\u00f3a t\u00ecm ki\u1ebfm (b\u1eaft bu\u1ed9c)<\/td><td>coffee, nature, technology<\/td><\/tr><tr><td><code>per_page<\/code><\/td><td>S\u1ed1 \u1ea3nh m\u1ed7i trang<\/td><td>1 \u0111\u1ebfn 80<\/td><\/tr><tr><td><code>page<\/code><\/td><td>Trang s\u1ed1 m\u1ea5y<\/td><td>1, 2, 3&#8230;<\/td><\/tr><tr><td><code>orientation<\/code><\/td><td>H\u01b0\u1edbng \u1ea3nh<\/td><td>landscape, portrait, square<\/td><\/tr><tr><td><code>size<\/code><\/td><td>K\u00edch th\u01b0\u1edbc t\u1ed1i thi\u1ec3u<\/td><td>large, medium, small<\/td><\/tr><tr><td><code>color<\/code><\/td><td>M\u00e0u ch\u1ee7 \u0111\u1ea1o<\/td><td>red, blue, green&#8230;<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">Tham s\u1ed1 c\u1ee7a Pexels Search for Photos (theo t\u00e0i li\u1ec7u Pexels)<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">B\u1ea1n c\u00f3 th\u1ec3 vi\u1ebft th\u1eb3ng v\u00e0o URL, v\u00ed d\u1ee5 ch\u1ec9 l\u1ea5y \u1ea3nh n\u1eb1m ngang:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:\/\/api.pexels.com\/v1\/search?query=coffee&amp;per_page=3&amp;orientation=landscape<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Ho\u1eb7c b\u1eadt <strong>Send Query Parameters<\/strong> v\u00e0 th\u00eam t\u1eebng c\u1eb7p Name\/Value, d\u1ec5 \u0111\u1ecdc v\u00e0 d\u1ec5 thay b\u1eb1ng expression h\u01a1n.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_6:_B\u1ea5m_Execute_step_v\u00e0_\u0111\u1ecdc_k\u1ebft_qu\u1ea3\">B\u01b0\u1edbc 6: B\u1ea5m Execute step v\u00e0 \u0111\u1ecdc k\u1ebft qu\u1ea3<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">B\u1ea5m <strong>Execute step<\/strong> \u0111\u1ec3 ch\u1ea1y ri\u00eang node. Panel Output hi\u1ec3n th\u1ecb d\u1eef li\u1ec7u \u1edf ba d\u1ea1ng Table, JSON, Schema. Ch\u1ecdn JSON \u0111\u1ec3 th\u1ea5y <code>photos<\/code>, <code>total_results<\/code>, <code>next_page<\/code>; m\u1edf t\u1eebng \u1ea3nh \u0111\u1ec3 l\u1ea5y \u0111\u01b0\u1eddng d\u1eabn trong <code>url<\/code> ho\u1eb7c <code>src<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1447\" height=\"804\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-15.png\" alt=\"Panel OUTPUT c\u1ee7a node HTTP Request d\u1ea1ng JSON: page 1, per_page 3, m\u1ea3ng photos 3 ph\u1ea7n t\u1eed, total_results v\u00e0 next_page\" class=\"wp-image-105013\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-15.png 1447w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-15-300x167.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-15-1024x569.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-15-768x427.png 768w\" sizes=\"(max-width: 1447px) 100vw, 1447px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1336\" height=\"769\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-16.png\" alt=\"Chi ti\u1ebft m\u1ed9t \u1ea3nh trong k\u1ebft qu\u1ea3 Pexels API: id, width, height, url, photographer, avg_color v\u00e0 c\u00e1c \u0111\u01b0\u1eddng d\u1eabn src\" class=\"wp-image-105014\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-16.png 1336w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-16-300x173.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-16-1024x589.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/04\/word-image-104998-16-768x442.png 768w\" sizes=\"(max-width: 1336px) 100vw, 1336px\" \/><\/figure>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_7:_D\u00f9ng_d\u1eef_li\u1ec7u_cho_c\u00e1c_b\u01b0\u1edbc_sau\">B\u01b0\u1edbc 7: D\u00f9ng d\u1eef li\u1ec7u cho c\u00e1c b\u01b0\u1edbc sau<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Tr\u01b0\u1eddng h\u1ee3p<\/th><th>Node ti\u1ebfp theo c\u00f3 th\u1ec3 d\u00f9ng<\/th><\/tr><\/thead><tbody><tr><td>G\u1eedi \u1ea3nh qua Telegram<\/td><td>Telegram node<\/td><\/tr><tr><td>G\u1eedi \u1ea3nh qua email<\/td><td>Gmail ho\u1eb7c Send Email node<\/td><\/tr><tr><td>L\u01b0u k\u1ebft qu\u1ea3 v\u00e0o Airtable<\/td><td>Airtable node<\/td><\/tr><tr><td>L\u01b0u link \u1ea3nh v\u00e0o Google Sheet<\/td><td>Google Sheets node<\/td><\/tr><tr><td>X\u1eed l\u00fd t\u1eebng \u1ea3nh<\/td><td>Split Out t\u00e1ch m\u1ea3ng <code>photos<\/code> th\u00e0nh t\u1eebng item<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 id=\"N\u00ean_x\u00e1c_th\u1ef1c_API_trong_HTTP_Request_b\u1eb1ng_c\u00e1ch_n\u00e0o?\">N\u00ean x\u00e1c th\u1ef1c API trong HTTP Request b\u1eb1ng c\u00e1ch n\u00e0o?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Node HTTP Request c\u00f3 hai ki\u1ec3u x\u00e1c th\u1ef1c: <strong>Predefined Credential Type<\/strong> d\u00f9ng credential d\u1ef1ng s\u1eb5n c\u1ee7a d\u1ecbch v\u1ee5 m\u00e0 n8n \u0111\u00e3 h\u1ed7 tr\u1ee3, v\u00e0 <strong>Generic Credential Type<\/strong> (Header Auth, Query Auth, Bearer, Basic, OAuth2, Digest) cho m\u1ecdi API c\u00f2n l\u1ea1i. C\u1ea3 hai \u0111\u1ec1u l\u01b0u kh\u00f3a trong credential thay v\u00ec trong tham s\u1ed1 node.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1400\" height=\"750\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-them-api-vao-n8n-chon-xac-thuc.webp\" alt=\"C\u00e2y quy\u1ebft \u0111\u1ecbnh ch\u1ecdn ki\u1ec3u x\u00e1c th\u1ef1c cho node HTTP Request trong n8n: d\u1ecbch v\u1ee5 \u0111\u00e3 c\u00f3 credential th\u00ec ch\u1ecdn Predefined Credential Type, ch\u01b0a c\u00f3 th\u00ec ch\u1ecdn Generic Credential Type nh\u01b0 Header Auth, Query Auth, Bearer, Basic, OAuth2; \u0111i\u1ec1n Allowed HTTP Request Domains\" class=\"wp-image-131678\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-them-api-vao-n8n-chon-xac-thuc.webp 1400w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-them-api-vao-n8n-chon-xac-thuc-300x161.webp 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-them-api-vao-n8n-chon-xac-thuc-1024x549.webp 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-them-api-vao-n8n-chon-xac-thuc-768x411.webp 768w\" sizes=\"(max-width: 1400px) 100vw, 1400px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">M\u1ed7i credential c\u00f3 tr\u01b0\u1eddng <strong>Allowed HTTP Request Domains<\/strong>: ch\u1ec9 \u0111\u1ecbnh t\u00ean mi\u1ec1n \u0111\u01b0\u1ee3c nh\u1eadn kh\u00f3a, v\u00ed d\u1ee5 <code>api.pexels.com<\/code>, \u0111\u1ec3 kh\u00f3a kh\u00f4ng b\u1ecb g\u1eedi nh\u1ea7m sang n\u01a1i kh\u00e1c khi ai \u0111\u00f3 s\u1eeda URL (<a href=\"https:\/\/docs.n8n.io\/build\/understand-workflows\/create-and-edit-credentials\/\" target=\"_blank\" rel=\"noopener nofollow\">Create and edit credentials<\/a>). Ki\u1ebfn th\u1ee9c chung v\u1ec1 credential c\u00f3 \u1edf b\u00e0i <a href=\"https:\/\/tino.vn\/blog\/credential-trong-n8n-la-gi\/\">credential trong n8n l\u00e0 g\u00ec<\/a>.<\/p>\n\n\n\n<h2 id=\"Credential_v\u00e0_HTTP_Request_kh\u00e1c_nhau_th\u1ebf_n\u00e0o?\">Credential v\u00e0 HTTP Request kh\u00e1c nhau th\u1ebf n\u00e0o?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Credential l\u00e0 th\u00f4ng tin \u0111\u0103ng nh\u1eadp \u0111\u01b0\u1ee3c l\u01b0u m\u00e3 h\u00f3a trong n8n; HTTP Request l\u00e0 node g\u1eedi request. Hai th\u1ee9 kh\u00f4ng thay th\u1ebf nhau: node d\u1ef1ng s\u1eb5n (Google Sheets, Telegram) ch\u1ec9 c\u1ea7n credential, c\u00f2n HTTP Request c\u1ea7n b\u1ea1n t\u1ef1 \u0111i\u1ec1n URL, header, body v\u00e0 th\u01b0\u1eddng d\u00f9ng th\u00eam credential \u0111\u1ec3 x\u00e1c th\u1ef1c.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Tr\u01b0\u1eddng h\u1ee3p<\/th><th>D\u00f9ng HTTP Request<\/th><th>D\u00f9ng credential<\/th><\/tr><\/thead><tbody><tr><td>D\u1ecbch v\u1ee5 kh\u00f4ng c\u00f3 node s\u1eb5n trong n8n<\/td><td>C\u00f3<\/td><td>N\u00ean d\u00f9ng \u0111\u1ec3 gi\u1eef kh\u00f3a<\/td><\/tr><tr><td>D\u1ecbch v\u1ee5 c\u00f3 node s\u1eb5n (Google Sheets, Telegram&#8230;)<\/td><td>Kh\u00f4ng c\u1ea7n<\/td><td>C\u1ea7n<\/td><\/tr><tr><td>C\u1ea7n t\u00f9y ch\u1ec9nh URL, header, body<\/td><td>C\u1ea7n<\/td><td>C\u00f3 th\u1ec3 d\u00f9ng th\u00eam<\/td><\/tr><tr><td>G\u1ecdi API n\u1ed9i b\u1ed9 ho\u1eb7c REST API ri\u00eang<\/td><td>C\u1ea7n<\/td><td>C\u00f3 th\u1ec3 k\u00e8m theo<\/td><\/tr><tr><td>Endpoint node s\u1eb5n ch\u01b0a h\u1ed7 tr\u1ee3<\/td><td>C\u1ea7n, ch\u1ecdn Predefined Credential Type \u0111\u1ec3 d\u00f9ng l\u1ea1i credential c\u1ee7a node<\/td><td>D\u00f9ng l\u1ea1i credential \u0111\u00e3 t\u1ea1o<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 id=\"X\u1eed_l\u00fd_nhi\u1ec1u_trang,_gi\u1edbi_h\u1ea1n_t\u1ed1c_\u0111\u1ed9_v\u00e0_l\u1ed7i_khi_g\u1ecdi_API\">X\u1eed l\u00fd nhi\u1ec1u trang, gi\u1edbi h\u1ea1n t\u1ed1c \u0111\u1ed9 v\u00e0 l\u1ed7i khi g\u1ecdi API<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Khi g\u1ecdi API th\u1eadt, ba t\u00ecnh hu\u1ed1ng hay g\u1eb7p l\u00e0 d\u1eef li\u1ec7u chia nhi\u1ec1u trang, b\u1ecb gi\u1edbi h\u1ea1n t\u1ed1c \u0111\u1ed9 (l\u1ed7i 429) v\u00e0 l\u1ed7i t\u1ea1m th\u1eddi c\u1ee7a m\u00e1y ch\u1ee7. Node HTTP Request c\u00f3 s\u1eb5n t\u00f9y ch\u1ecdn cho c\u1ea3 ba (<a href=\"https:\/\/docs.n8n.io\/integrations\/builtin\/core-nodes\/n8n-nodes-base.httprequest\/common-issues\/\" target=\"_blank\" rel=\"noopener nofollow\">HTTP Request common issues<\/a>):<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Pagination<\/strong> (Options): t\u1ef1 g\u1ecdi ti\u1ebfp c\u00e1c trang. Ch\u1ecdn <em>Update a Parameter in Each Request<\/em> \u0111\u1ec3 t\u0103ng tham s\u1ed1 <code>page<\/code>, ho\u1eb7c <em>Response Contains Next URL<\/em> \u0111\u1ec3 \u0111i theo tr\u01b0\u1eddng nh\u01b0 <code>next_page<\/code> c\u1ee7a Pexels.<\/li>\n\n\n<li><strong>Batching<\/strong> (Options): khi node nh\u1eadn nhi\u1ec1u item, \u0111\u1eb7t Items per Batch v\u00e0 Batch Interval (ms) \u0111\u1ec3 g\u1eedi t\u1eebng l\u00f4, tr\u00e1nh v\u01b0\u1ee3t gi\u1edbi h\u1ea1n t\u1ed1c \u0111\u1ed9.<\/li>\n\n\n<li><strong>Retry On Fail<\/strong> (tab Settings): t\u1ef1 ch\u1ea1y l\u1ea1i khi l\u1ed7i, \u0111\u1eb7t Max Tries v\u00e0 Wait Between Tries; h\u1ee3p v\u1edbi l\u1ed7i 429, 5xx.<\/li>\n\n\n<li><strong>On Error<\/strong> (tab Settings): ch\u1ecdn Continue \u0111\u1ec3 workflow kh\u00f4ng d\u1eebng khi m\u1ed9t item l\u1ed7i, r\u1ed3i x\u1eed l\u00fd nh\u00e1nh l\u1ed7i ri\u00eang.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">L\u1ed7i <strong>401<\/strong> th\u01b0\u1eddng do thi\u1ebfu ho\u1eb7c sai kh\u00f3a, xem <a href=\"https:\/\/tino.vn\/blog\/khac-phuc-loi-401-unauthorized-authorization-failed\/\">c\u00e1ch kh\u1eafc ph\u1ee5c l\u1ed7i 401 Unauthorized<\/a>; b\u1ea3ng tra c\u00e1c m\u00e3 400, 403, 404, 429, 5xx c\u00f3 \u1edf b\u00e0i <a href=\"https:\/\/tino.vn\/blog\/loi-ket-noi-api-thuong-gap-trong-n8n\/\">l\u1ed7i k\u1ebft n\u1ed1i API th\u01b0\u1eddng g\u1eb7p trong n8n<\/a>.<\/p>\n\n\n\n<h3 id=\"K\u1ebft_lu\u1eadn\">K\u1ebft lu\u1eadn<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Th\u00eam API v\u00e0o n8n g\u1ed3m b\u1ed1n vi\u1ec7c: l\u1ea5y endpoint trong t\u00e0i li\u1ec7u, c\u1ea5u h\u00ecnh method v\u00e0 URL (ho\u1eb7c Import cURL), l\u01b0u kh\u00f3a trong credential, r\u1ed3i ch\u1ea1y th\u1eed b\u1eb1ng Execute step. Khi API tr\u1ea3 nhi\u1ec1u d\u1eef li\u1ec7u ho\u1eb7c gi\u1edbi h\u1ea1n t\u1ed1c \u0111\u1ed9, b\u1eadt Pagination, Batching v\u00e0 Retry On Fail tr\u01b0\u1edbc khi Publish workflow.<\/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=\"L\u00e0m_sao_\u0111\u1ec3_bi\u1ebft_d\u1ecbch_v\u1ee5_c\u00f3_API_hay_kh\u00f4ng?\">L\u00e0m sao \u0111\u1ec3 bi\u1ebft d\u1ecbch v\u1ee5 c\u00f3 API hay 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\">Ph\u1ea7n l\u1edbn d\u1ecbch v\u1ee5 c\u00f3 trang t\u00e0i li\u1ec7u API ch\u00ednh th\u1ee9c. T\u00ecm theo c\u00fa ph\u00e1p: t\u00ean d\u1ecbch v\u1ee5 + API documentation. N\u1ebfu t\u00e0i li\u1ec7u c\u00f3 v\u00ed d\u1ee5 curl, d\u00f9ng Import cURL trong node HTTP Request.<\/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_sao_ki\u1ec3m_tra_API_\u0111\u00e3_g\u1ecdi_th\u00e0nh_c\u00f4ng_hay_ch\u01b0a?\">L\u00e0m sao ki\u1ec3m tra API \u0111\u00e3 g\u1ecdi th\u00e0nh c\u00f4ng hay ch\u01b0a?<\/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\">B\u1ea5m Execute step r\u1ed3i xem panel Output. C\u00f3 d\u1eef li\u1ec7u JSON l\u00e0 g\u1ecdi th\u00e0nh c\u00f4ng. N\u1ebfu b\u00e1o l\u1ed7i, \u0111\u1ecdc m\u00e3 l\u1ed7i: 401 ki\u1ec3m l\u1ea1i kh\u00f3a v\u00e0 header, 404 ki\u1ec3m l\u1ea1i URL, 429 l\u00e0 v\u01b0\u1ee3t gi\u1edbi h\u1ea1n t\u1ed1c \u0111\u1ed9.<\/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=\"M\u1ed9t_API_c\u00f3_th\u1ec3_d\u00f9ng_cho_nhi\u1ec1u_node_trong_workflow_kh\u00f4ng?\">M\u1ed9t API c\u00f3 th\u1ec3 d\u00f9ng cho nhi\u1ec1u node trong workflow 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\">C\u00f3. M\u1ed9t node HTTP Request l\u1ea5y d\u1eef li\u1ec7u, c\u00e1c node sau x\u1eed l\u00fd, l\u01b0u, g\u1eedi \u0111i ho\u1eb7c l\u1eb7p l\u1ea1i. Credential c\u1ee7a API c\u0169ng d\u00f9ng l\u1ea1i \u0111\u01b0\u1ee3c cho nhi\u1ec1u node v\u00e0 nhi\u1ec1u workflow.<\/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_c\u1ea7n_bi\u1ebft_l\u1eadp_tr\u00ecnh_\u0111\u1ec3_d\u00f9ng_API_trong_n8n_kh\u00f4ng?\">C\u00f3 c\u1ea7n bi\u1ebft l\u1eadp tr\u00ecnh \u0111\u1ec3 d\u00f9ng API trong n8n 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\">Kh\u00f4ng c\u1ea7n l\u1eadp tr\u00ecnh chuy\u00ean s\u00e2u. B\u1ea1n c\u1ea7n hi\u1ec3u JSON, header, URL, method GET\/POST v\u00e0 bi\u1ebft \u0111\u1ecdc t\u00e0i li\u1ec7u API c\u1ee7a d\u1ecbch v\u1ee5.<\/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_n\u00ean_d\u00e1n_API_key_v\u00e0o_URL_kh\u00f4ng?\">C\u00f3 n\u00ean d\u00e1n API key v\u00e0o URL 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\">Kh\u00f4ng n\u00ean. Kh\u00f3a trong URL d\u1ec5 l\u1ed9 qua log v\u00e0 khi export workflow. H\u00e3y d\u00f9ng credential (Header Auth ho\u1eb7c Query Auth) v\u00e0 \u0111i\u1ec1n Allowed HTTP Request Domains.<\/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\": \"L\u00e0m sao \u0111\u1ec3 bi\u1ebft d\u1ecbch v\u1ee5 c\u00f3 API hay kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Ph\u1ea7n l\u1edbn d\u1ecbch v\u1ee5 c\u00f3 trang t\u00e0i li\u1ec7u API ch\u00ednh th\u1ee9c. T\u00ecm theo c\u00fa ph\u00e1p: t\u00ean d\u1ecbch v\u1ee5 + API documentation. N\u1ebfu t\u00e0i li\u1ec7u c\u00f3 v\u00ed d\u1ee5 curl, d\u00f9ng Import cURL trong node HTTP Request.<\/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 sao ki\u1ec3m tra API \u0111\u00e3 g\u1ecdi th\u00e0nh c\u00f4ng hay ch\u01b0a?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>B\u1ea5m Execute step r\u1ed3i xem panel Output. C\u00f3 d\u1eef li\u1ec7u JSON l\u00e0 g\u1ecdi th\u00e0nh c\u00f4ng. N\u1ebfu b\u00e1o l\u1ed7i, \u0111\u1ecdc m\u00e3 l\u1ed7i: 401 ki\u1ec3m l\u1ea1i kh\u00f3a v\u00e0 header, 404 ki\u1ec3m l\u1ea1i URL, 429 l\u00e0 v\u01b0\u1ee3t gi\u1edbi h\u1ea1n t\u1ed1c \u0111\u1ed9.<\/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\": \"M\u1ed9t API c\u00f3 th\u1ec3 d\u00f9ng cho nhi\u1ec1u node trong workflow kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>C\u00f3. M\u1ed9t node HTTP Request l\u1ea5y d\u1eef li\u1ec7u, c\u00e1c node sau x\u1eed l\u00fd, l\u01b0u, g\u1eedi \u0111i ho\u1eb7c l\u1eb7p l\u1ea1i. Credential c\u1ee7a API c\u0169ng d\u00f9ng l\u1ea1i \u0111\u01b0\u1ee3c cho nhi\u1ec1u node v\u00e0 nhi\u1ec1u workflow.<\/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 c\u1ea7n bi\u1ebft l\u1eadp tr\u00ecnh \u0111\u1ec3 d\u00f9ng API trong n8n kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Kh\u00f4ng c\u1ea7n l\u1eadp tr\u00ecnh chuy\u00ean s\u00e2u. B\u1ea1n c\u1ea7n hi\u1ec3u JSON, header, URL, method GET\/POST v\u00e0 bi\u1ebft \u0111\u1ecdc t\u00e0i li\u1ec7u API c\u1ee7a d\u1ecbch v\u1ee5.<\/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 n\u00ean d\u00e1n API key v\u00e0o URL kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Kh\u00f4ng n\u00ean. Kh\u00f3a trong URL d\u1ec5 l\u1ed9 qua log v\u00e0 khi export workflow. H\u00e3y d\u00f9ng credential (Header Auth ho\u1eb7c Query Auth) v\u00e0 \u0111i\u1ec1n Allowed HTTP Request Domains.<\/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\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","protected":false},"excerpt":{"rendered":"<p>\u0110\u1ec3 g\u1ecdi m\u1ed9t API trong n8n, b\u1ea1n th\u00eam node HTTP Request, ch\u1ecdn method (GET, POST&#8230;), nh\u1eadp URL endpoint, r\u1ed3i c\u1ea5u h\u00ecnh x\u00e1c th\u1ef1c b\u1eb1ng credential thay v\u00ec d\u00e1n API key v\u00e0o URL. C\u00e1ch nhanh nh\u1ea5t l\u00e0 d\u00f9ng Import cURL: d\u00e1n l\u1ec7nh curl t\u1eeb t\u00e0i li\u1ec7u API, n8n t\u1ef1 \u0111i\u1ec1n URL, header v\u00e0 body. B\u00e0i n\u00e0y [&hellip;]<\/p>\n","protected":false},"author":23,"featured_media":105025,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7397],"tags":[7343],"class_list":["post-104998","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\/104998","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=104998"}],"version-history":[{"count":5,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/104998\/revisions"}],"predecessor-version":[{"id":131696,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/104998\/revisions\/131696"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media\/105025"}],"wp:attachment":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media?parent=104998"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/categories?post=104998"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/tags?post=104998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}