{"id":1664,"date":"2018-11-03T12:54:07","date_gmt":"2018-11-03T03:54:07","guid":{"rendered":"https:\/\/n8finch2024.local\/?p=1664"},"modified":"2022-03-11T06:44:29","modified_gmt":"2022-03-10T21:44:29","slug":"more-secure-api-requests-with-wordpress-helper-functions","status":"publish","type":"post","link":"https:\/\/n8finch2024.local\/more-secure-api-requests-with-wordpress-helper-functions\/","title":{"rendered":"More Secure API Requests with WordPress Helper Functions"},"content":{"rendered":"\n

Making API requests with JavaScript is something web developers do everyday. API services often require you to keep API keys out of the browser or route your requests through a server to secure the request. <\/p>\n\n\n\n\n\n\n\n

These requirements are meant to keep the API secure and not overloaded with hijacked requests. We will look at a workflow in WordPress that will route a request through the server and return the information to the browser without a page refresh. <\/p>\n\n\n\n

This workflow is particularly useful if you want or need to keep your API keys secret or out of the browser client, and make requests from a server and not the browser.<\/p>\n\n\n\n

Presentation PDF<\/a><\/strong><\/p>\n\n\n\n

Photo by marcos mayer<\/a> on Unsplash<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

Making API requests with JavaScript is something web developers do everyday. API services often require you to keep API keys out of the browser or route your requests through a server to secure the request.<\/p>\n","protected":false},"author":1,"featured_media":1666,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","footnotes":""},"categories":[1,46],"tags":[],"yoast_head":"\nMore Secure API Requests with WordPress Helper Functions | Nate Finch<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"More Secure API Requests with WordPress Helper Functions | Nate Finch\" \/>\n<meta property=\"og:description\" content=\"Making API requests with JavaScript is something web developers do everyday. API services often require you to keep API keys out of the browser or route your requests through a server to secure the request.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"Nate Finch\" \/>\n<meta property=\"article:published_time\" content=\"2018-11-03T03:54:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-10T21:44:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/n8finch-site.site.strattic.io\/wp-content\/uploads\/2020\/11\/more-secure_kaiay4.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Nate\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@n8finch\" \/>\n<meta name=\"twitter:site\" content=\"@n8finch\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nate\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/\"},\"author\":{\"name\":\"Nate\",\"@id\":\"https:\/\/n8finch.local\/#\/schema\/person\/619068414583ca3c43bb135af49a47ce\"},\"headline\":\"More Secure API Requests with WordPress Helper Functions\",\"datePublished\":\"2018-11-03T03:54:07+00:00\",\"dateModified\":\"2022-03-10T21:44:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/\"},\"wordCount\":128,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/n8finch.local\/#\/schema\/person\/619068414583ca3c43bb135af49a47ce\"},\"articleSection\":[\"Blog\",\"Talks\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/\",\"url\":\"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/\",\"name\":\"More Secure API Requests with WordPress Helper Functions | Nate Finch\",\"isPartOf\":{\"@id\":\"https:\/\/n8finch.local\/#website\"},\"datePublished\":\"2018-11-03T03:54:07+00:00\",\"dateModified\":\"2022-03-10T21:44:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/n8finch.local\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"More Secure API Requests with WordPress Helper Functions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/n8finch.local\/#website\",\"url\":\"https:\/\/n8finch.local\/\",\"name\":\"Nate Finch\",\"description\":\"All the things, keeping it clever...🤓\",\"publisher\":{\"@id\":\"https:\/\/n8finch.local\/#\/schema\/person\/619068414583ca3c43bb135af49a47ce\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/n8finch.local\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/n8finch.local\/#\/schema\/person\/619068414583ca3c43bb135af49a47ce\",\"name\":\"Nate\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/n8finch.local\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/n8finch2024.local\/wp-content\/uploads\/2020\/11\/nate-pic_ykd6mq.jpg\",\"contentUrl\":\"https:\/\/n8finch2024.local\/wp-content\/uploads\/2020\/11\/nate-pic_ykd6mq.jpg\",\"width\":796,\"height\":792,\"caption\":\"Nate\"},\"logo\":{\"@id\":\"https:\/\/n8finch.local\/#\/schema\/person\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"More Secure API Requests with WordPress Helper Functions | Nate Finch","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/","og_locale":"en_US","og_type":"article","og_title":"More Secure API Requests with WordPress Helper Functions | Nate Finch","og_description":"Making API requests with JavaScript is something web developers do everyday. API services often require you to keep API keys out of the browser or route your requests through a server to secure the request.","og_url":"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/","og_site_name":"Nate Finch","article_published_time":"2018-11-03T03:54:07+00:00","article_modified_time":"2022-03-10T21:44:29+00:00","og_image":[{"width":900,"height":600,"url":"https:\/\/n8finch-site.site.strattic.io\/wp-content\/uploads\/2020\/11\/more-secure_kaiay4.jpg","type":"image\/jpeg"}],"author":"Nate","twitter_card":"summary_large_image","twitter_creator":"@n8finch","twitter_site":"@n8finch","twitter_misc":{"Written by":"Nate","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/#article","isPartOf":{"@id":"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/"},"author":{"name":"Nate","@id":"https:\/\/n8finch.local\/#\/schema\/person\/619068414583ca3c43bb135af49a47ce"},"headline":"More Secure API Requests with WordPress Helper Functions","datePublished":"2018-11-03T03:54:07+00:00","dateModified":"2022-03-10T21:44:29+00:00","mainEntityOfPage":{"@id":"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/"},"wordCount":128,"commentCount":0,"publisher":{"@id":"https:\/\/n8finch.local\/#\/schema\/person\/619068414583ca3c43bb135af49a47ce"},"articleSection":["Blog","Talks"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/","url":"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/","name":"More Secure API Requests with WordPress Helper Functions | Nate Finch","isPartOf":{"@id":"https:\/\/n8finch.local\/#website"},"datePublished":"2018-11-03T03:54:07+00:00","dateModified":"2022-03-10T21:44:29+00:00","breadcrumb":{"@id":"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/n8finch-site.site.strattic.io\/more-secure-api-requests-with-wordpress-helper-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/n8finch.local\/"},{"@type":"ListItem","position":2,"name":"More Secure API Requests with WordPress Helper Functions"}]},{"@type":"WebSite","@id":"https:\/\/n8finch.local\/#website","url":"https:\/\/n8finch.local\/","name":"Nate Finch","description":"All the things, keeping it clever...🤓","publisher":{"@id":"https:\/\/n8finch.local\/#\/schema\/person\/619068414583ca3c43bb135af49a47ce"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/n8finch.local\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/n8finch.local\/#\/schema\/person\/619068414583ca3c43bb135af49a47ce","name":"Nate","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/n8finch.local\/#\/schema\/person\/image\/","url":"https:\/\/n8finch2024.local\/wp-content\/uploads\/2020\/11\/nate-pic_ykd6mq.jpg","contentUrl":"https:\/\/n8finch2024.local\/wp-content\/uploads\/2020\/11\/nate-pic_ykd6mq.jpg","width":796,"height":792,"caption":"Nate"},"logo":{"@id":"https:\/\/n8finch.local\/#\/schema\/person\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/n8finch2024.local\/wp-json\/wp\/v2\/posts\/1664"}],"collection":[{"href":"https:\/\/n8finch2024.local\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/n8finch2024.local\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/n8finch2024.local\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/n8finch2024.local\/wp-json\/wp\/v2\/comments?post=1664"}],"version-history":[{"count":4,"href":"https:\/\/n8finch2024.local\/wp-json\/wp\/v2\/posts\/1664\/revisions"}],"predecessor-version":[{"id":1889,"href":"https:\/\/n8finch2024.local\/wp-json\/wp\/v2\/posts\/1664\/revisions\/1889"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/n8finch2024.local\/wp-json\/wp\/v2\/media\/1666"}],"wp:attachment":[{"href":"https:\/\/n8finch2024.local\/wp-json\/wp\/v2\/media?parent=1664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/n8finch2024.local\/wp-json\/wp\/v2\/categories?post=1664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/n8finch2024.local\/wp-json\/wp\/v2\/tags?post=1664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}