{"id":1156,"date":"2022-03-02T14:53:43","date_gmt":"2022-03-02T14:53:43","guid":{"rendered":"https:\/\/blog.ultramsg.com\/whatsappapi-mesaj-ile-dugum-js-and-ultramsg\/"},"modified":"2022-03-02T14:53:45","modified_gmt":"2022-03-02T14:53:45","slug":"whatsappapi-mesaj-ile-dugum-js-and-ultramsg","status":"publish","type":"post","link":"https:\/\/blog.ultramsg.com\/tr\/whatsappapi-mesaj-ile-dugum-js-and-ultramsg\/","title":{"rendered":"Node.js kullanarak WhatsApp API ile kolayca Mesaj G\u00f6nderme"},"content":{"rendered":"\n<p><\/p>\n\n<h2 class=\"wp-block-heading\" id=\"introduction\">Tan\u0131t\u0131m<\/h2>\n\n<p>Bu dersimizde Node.js kullanarak WhatsAppAPI \u00fczerinden WhatsApp mesaj\u0131 g\u00f6ndermek i\u00e7in bir sayfa olu\u015fturaca\u011f\u0131z.<\/p>\n\n<h2 class=\"wp-block-heading\">Kurulum istek mod\u00fcl\u00fc<\/h2>\n\n<p><\/p>\n\n<pre class=\"wp-block-preformatted\"><code data-enlighter-language=\"powershell\" class=\"EnlighterJSRAW\">npm install request<\/code><\/pre>\n\n<h2 class=\"wp-block-heading\" id=\"first-whatsapp-api-message-using-objective-c\">Node.js Kullanan \u0130lk WhatsApp API Mesaj\u0131<\/h2>\n\n<h2 class=\"wp-block-heading\" id=\"first-whatsapp-api-message-using-objective-c\"><\/h2>\n\n<pre class=\"wp-block-code\"><code><code data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">var request = require(\"request\");\n\nvar options = {\n  method: 'POST',\n  url: 'https:\/\/api.ultramsg.com\/instance1150\/messages\/chat',\n  headers: {'content-type': 'application\/x-www-form-urlencoded'},\n  form: {\n    token: 'Instance_token',\n    to: '14155552671',\n    body: 'WhatsApp API on UltraMsg.com works good',\n    priority: '10',\n    referenceId: ''\n  }\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});<\/code><\/code><\/pre>\n\n<h2 class=\"wp-block-heading\">Resim G\u00f6nder<br\/><\/h2>\n\n<pre class=\"wp-block-code\"><code><code data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">var request = require(\"request\");\n\nvar options = {\n  method: 'POST',\n  url: 'https:\/\/api.ultramsg.com\/instance1150\/messages\/image',\n  headers: {'content-type': 'application\/x-www-form-urlencoded'},\n  form: {\n    token: 'Instance_token',\n    to: '14155552671',\n    image: 'https:\/\/file-example.s3-accelerate.amazonaws.com\/images\/test.jpg',\n    caption: 'image Caption',\n    referenceId: ''\n  }\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});<\/code><\/code><\/pre>\n\n<h2 class=\"wp-block-heading\">Belge G\u00f6nder<br\/><\/h2>\n\n<pre class=\"wp-block-code\"><code><code data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">var request = require(\"request\");\n\nvar options = {\n  method: 'POST',\n  url: 'https:\/\/api.ultramsg.com\/instance1150\/messages\/document',\n  headers: {'content-type': 'application\/x-www-form-urlencoded'},\n  form: {\n    token: 'Instance_token',\n    to: '14155552671',\n    filename: 'hello.pdf',\n    document: 'https:\/\/file-example.s3-accelerate.amazonaws.com\/documents\/cv.pdf',\n    referenceId: ''\n  }\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});<\/code><\/code><\/pre>\n\n<h2 class=\"wp-block-heading\">Ses G\u00f6nder<br\/><\/h2>\n\n<pre class=\"wp-block-code\"><code><code data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">var request = require(\"request\");\n\nvar options = {\n  method: 'POST',\n  url: 'https:\/\/api.ultramsg.com\/instance1150\/messages\/audio',\n  headers: {'content-type': 'application\/x-www-form-urlencoded'},\n  form: {token: 'Instance_token', to: '14155552671', audio: 'https:\/\/file-example.s3-accelerate.amazonaws.com\/audio\/2.mp3', referenceId: ''}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});<\/code><\/code><\/pre>\n\n<h2 class=\"wp-block-heading\">Ses G\u00f6nder<br\/><\/h2>\n\n<pre class=\"wp-block-code\"><code><code data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">var request = require(\"request\");\n\nvar options = {\n  method: 'POST',\n  url: 'https:\/\/api.ultramsg.com\/instance1150\/messages\/voice',\n  headers: {'content-type': 'application\/x-www-form-urlencoded'},\n  form: {token: 'Instance_token', to: '14155552671', audio: 'https:\/\/file-example.s3-accelerate.amazonaws.com\/voice\/oog_example.ogg', referenceId: ''}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});<\/code><\/code><\/pre>\n\n<h2 class=\"wp-block-heading\">Video G\u00f6nder<br\/><\/h2>\n\n<pre class=\"wp-block-code\"><code><code data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">var request = require(\"request\");\n\nvar options = {\n  method: 'POST',\n  url: 'https:\/\/api.ultramsg.com\/instance1150\/messages\/video',\n  headers: {'content-type': 'application\/x-www-form-urlencoded'},\n  form: {token: 'Instance_token', to: '14155552671', video: 'https:\/\/file-example.s3-accelerate.amazonaws.com\/video\/test.mp4', referenceId: ''}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});<\/code><\/code><\/pre>\n\n<h2 class=\"wp-block-heading\">Link g\u00f6nder<br\/><\/h2>\n\n<pre class=\"wp-block-code\"><code><code data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">var request = require(\"request\");\n\nvar options = {\n  method: 'POST',\n  url: 'https:\/\/api.ultramsg.com\/instance1150\/messages\/link',\n  headers: {'content-type': 'application\/x-www-form-urlencoded'},\n  form: {token: 'Instance_token', to: '14155552671', link: 'https:\/\/en.wikipedia.org\/wiki\/COVID-19', referenceId: ''}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});<\/code><\/code><\/pre>\n\n<h2 class=\"wp-block-heading\">Ki\u015fi G\u00f6nder<br\/><\/h2>\n\n<pre class=\"wp-block-code\"><code><code data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">var request = require(\"request\");\n\nvar options = {\n  method: 'POST',\n  url: 'https:\/\/api.ultramsg.com\/instance1150\/messages\/contact',\n  headers: {'content-type': 'application\/x-www-form-urlencoded'},\n  form: {\n    token: 'Instance_token',\n    to: '14155552671',\n    contact: '14000000001@c.us',\n    referenceId: ''\n  }\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});<\/code><\/code><\/pre>\n\n<h2 class=\"wp-block-heading\">Konum g\u00f6ndermek<br\/><\/h2>\n\n<pre class=\"wp-block-code\"><code><code data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">var request = require(\"request\");\n\nvar options = {\n  method: 'POST',\n  url: 'https:\/\/api.ultramsg.com\/instance1150\/messages\/location',\n  headers: {'content-type': 'application\/x-www-form-urlencoded'},\n  form: {\n    token: 'Instance_token',\n    to: '14155552671',\n    address: 'ABC company \\n Sixth floor , office 38',\n    lat: '25.197197',\n    lng: '55.2721877',\n    referenceId: ''\n  }\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});<\/code><\/code><\/pre>\n\n<h2 class=\"wp-block-heading\">Vcard g\u00f6nder<br\/><\/h2>\n\n<pre class=\"wp-block-code\"><code><code data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">var request = require(\"request\");\n\nvar options = {\n  method: 'POST',\n  url: 'https:\/\/api.ultramsg.com\/instance1150\/messages\/vcard',\n  headers: {'content-type': 'application\/x-www-form-urlencoded'},\n  form: {token: 'Instance_token', to: '14155552671', vcard: ' BEGIN:VCARD\\nVERSION:3.0\\nN:lastname;firstname\\nFN:firstname lastname\\nTEL;TYPE=CELL;waid=14000000001:14000000002\\nNICKNAME:nickname\\nBDAY:01.01.1987\\nX-GENDER:M\\nNOTE:note\\nADR;TYPE=home:;;;;;;\\nADR;TYPE=work_:;;;;;;\\nEND:VCARD', referenceId: ''}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});<\/code><\/code><\/pre>\n\n<ul class=\"wp-block-list\"><li>son olarak, Tam <a href=\"https:\/\/docs.ultramsg.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Whatsapp API Belgelerini<\/a> ve <a href=\"https:\/\/blog.ultramsg.com\/whatsapp-api-by-ultramsg-faq\/\" data-type=\"URL\" data-id=\"https:\/\/blog.ultramsg.com\/whatsapp-api-by-ultramsg-faq\/\">SSS&#8217;yi<\/a> g\u00f6rebilirsiniz.<\/li><li><a href=\"https:\/\/blog.ultramsg.com\/tr\/almak-whatsapp-api-mesajlari-kullanim-webhook-nodejs\/\" data-type=\"URL\" data-id=\"https:\/\/blog.ultramsg.com\/receive-whatsapp-api-messages-use-webhook-nodejs\/\">Webhook ve Node.js kullanarak WhatsApp mesajlar\u0131 al\u0131n<\/a><\/li><\/ul>\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tan\u0131t\u0131m Bu dersimizde Node.js kullanarak WhatsAppAPI \u00fczerinden WhatsApp mesaj\u0131 g\u00f6ndermek i\u00e7in bir sayfa olu\u015fturaca\u011f\u0131z. Kurulum &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Node.js kullanarak WhatsApp API ile kolayca Mesaj G\u00f6nderme\" class=\"read-more button\" href=\"https:\/\/blog.ultramsg.com\/tr\/whatsappapi-mesaj-ile-dugum-js-and-ultramsg\/#more-1156\" aria-label=\"Read more about Node.js kullanarak WhatsApp API ile kolayca Mesaj G\u00f6nderme\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":1133,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[82],"tags":[28,85,87],"class_list":["post-1156","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-whatsapp-apisi","tag-node-js","tag-ogreticiler","tag-whatsapp-apisi","infinite-scroll-item","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-25","no-featured-image-padding"],"_links":{"self":[{"href":"https:\/\/blog.ultramsg.com\/tr\/wp-json\/wp\/v2\/posts\/1156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ultramsg.com\/tr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ultramsg.com\/tr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ultramsg.com\/tr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ultramsg.com\/tr\/wp-json\/wp\/v2\/comments?post=1156"}],"version-history":[{"count":3,"href":"https:\/\/blog.ultramsg.com\/tr\/wp-json\/wp\/v2\/posts\/1156\/revisions"}],"predecessor-version":[{"id":1159,"href":"https:\/\/blog.ultramsg.com\/tr\/wp-json\/wp\/v2\/posts\/1156\/revisions\/1159"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ultramsg.com\/tr\/wp-json\/wp\/v2\/media\/1133"}],"wp:attachment":[{"href":"https:\/\/blog.ultramsg.com\/tr\/wp-json\/wp\/v2\/media?parent=1156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ultramsg.com\/tr\/wp-json\/wp\/v2\/categories?post=1156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ultramsg.com\/tr\/wp-json\/wp\/v2\/tags?post=1156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}