{"id":3601,"date":"2018-06-19T11:25:55","date_gmt":"2018-06-19T11:25:55","guid":{"rendered":"https:\/\/www.botreetechnologies.com\/blog\/?p=3601"},"modified":"2023-01-24T11:36:07","modified_gmt":"2023-01-24T06:06:07","slug":"google-api-authorization-with-ruby-using-long-lasting-refresh-token","status":"publish","type":"post","link":"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/","title":{"rendered":"Google API Authorization with Ruby using long lasting Refresh Token"},"content":{"rendered":"\n<p>Authorization is the most important thing when it comes to API integration.<\/p>\n\n\n\n<p>There are multiple ways for authorization, based on whom your code access Google on behalf of:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>On Behalf of yourself (Command line authorization).<\/li><li>On Behalf of the user who accesses your web app (Web-based authorization).<\/li><li>On Behalf of no existing users (Service account).<\/li><\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"771\" height=\"221\" src=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/Web-based-authorization.png\" alt=\"Web based authorization\" class=\"wp-image-13612\" srcset=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/Web-based-authorization.png 771w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/Web-based-authorization-300x86.png 300w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/Web-based-authorization-768x220.png 768w\" sizes=\"auto, (max-width: 771px) 100vw, 771px\" \/><\/figure>\n<\/div>\n\n\n<p>Today we will see how to achieve Web-based authorization. There are two ways with the help of which we can implement this.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Checkout: <a href=\"https:\/\/www.botreetechnologies.com\/blog\/top-website-examples-built-with-ruby-on-rails\/\" target=\"_blank\" rel=\"noreferrer noopener\">Top 12 Website Examples Built with Ruby on Rails<\/a><\/strong><\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">How to do it?<\/h2>\n\n\n\n<p><b>With auth_url<\/b><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>When the application needs to access a user&#8217;s data, redirect the user to Google&#8217;s OAuth 2.0 server, Google&#8217;s OAuth 2.0 server authenticates the user and obtains consent from the user for your application to access the requested scopes. The response is sent back to your application using the redirect URL you specified.<\/li><li>But here user intervention is frequently required to grant your application the requested access<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">With Long-lasting refresh token<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Access token expires in every 60 min, so you need to refresh it every time. We can get long-lasting refresh token and use it to generate new access token as and when we need.<\/li><li>unlike <i>auth_url<\/i> option, frequent user intervention is also not required here<\/li><\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Today We will be looking at, how authorization can be implemented with long lasting refresh token. So here we Go! <em>We will use the Google API client Ruby to see how long lasting refresh token can be used.<\/em><\/p><\/blockquote>\n\n\n\n<p><b>Step-1: Create a Web app and obtain refresh token and other credentials.<\/b><\/p>\n\n\n\n<p>This can be done with the Oauth2 Playground at <a href=\"https:\/\/developers.google.com\/oauthplayground\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/developers.google.com\/oauthplayground<\/a>.<\/p>\n\n\n\n<p>Then,<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Create the Google Account (eg. my.drive.app@gmail.com)<\/li><li>Use the API console to register the mydriveapp (<a href=\"https:\/\/console.developers.google.com\/apis\/credentials\/oauthclient?project=mydriveapp\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/console.developers.google.com\/apis\/credentials\/oauthclient?project=mydriveapp<\/a> or just <a href=\"https:\/\/console.developers.google.com\/apis\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/console.developers.google.com\/apis\/<\/a>)<\/li><li>Create a new set of credentials (NB <i>OAuth Client ID<\/i> <b>not<\/b> <i>Service Account Key<\/i> and then choose &#8220;Web Application&#8221; from the selection)<\/li><li>Include <a href=\"https:\/\/developers.google.com\/oauthplayground\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/developers.google.com\/oauthplayground<\/a> as a valid redirect URI<\/li><li>Note the client ID (web app) and Client Secret<\/li><li>Login as my.drive.app@gmail.com<\/li><li>Go to Oauth2 playground<\/li><li>In Settings (gear icon), set\n<ul>\n<li>Oauth flow: server<\/li>\n<li>Access type: offline<\/li>\n<li>Use your own OAuth credentials: TICK<\/li>\n<li>Client Id and Client Secret: from step 5<\/li>\n<\/ul>\n<\/li><li>Click Step 1 and choose Drive API <a href=\"https:\/\/www.googleapis.com\/auth\/drive\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.googleapis.com\/auth\/drive<\/a> (having said that, this technique also works for any of the Google APIs listed).<\/li><li>Click Authorize APIs. You will be prompted to choose your Google account and confirm access<\/li><li>Click Step 2 and &#8220;Exchange Authorization code for tokens&#8221;.<\/li><li>Copy the returned Refresh Token and paste it into your app, source code or into some form of storage from where your app can retrieve it.<\/li><\/ol>\n\n\n\n<p>Now we have our credentials Client Id, Client Secret and refresh token with us from the Google API client library for Ruby.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Lets write some ruby code to get it to work&#8230;<\/p><\/blockquote>\n\n\n\n<p>Here we will be using <em>the googleauth<\/em> library, so create a simple Google API client ruby file and include this library.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><code>require \"googleauth\"<\/code><\/p><\/blockquote>\n\n\n\n<p>Now we have to create an instance of <i><code>Google::Auth::UserRefreshCredentials<\/code><\/i> so set credentials for our user,<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/AmitPatel-BoTreeConsulting\/b11ce603f53d4c49f49ee7dd31a4739d.js\"><\/script><\/p>\n\n\n\n<p>and done! Now you can use this credential instance to authorize any of the Google service you wish to use.<\/p>\n\n\n\n<p>You can use this as follows, here I am using Google Drive API so we need to add this first.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/AmitPatel-BoTreeConsulting\/1a4e317d26813d8f6bd118fcc197125c.js\"><\/script><\/p>\n\n\n\n<p>That&#8217;s it guys, and now we can use a service object to call any of the services of Google Drive API.<\/p>\n\n\n\n<p>So our final code will look like:<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/AmitPatel-BoTreeConsulting\/cb74b10779dfe8f205c0066c2c4628af.js\"><\/script><\/p>\n\n\n\n<p>That&#8217;s it! Happy coding!!!<\/p>\n\n\n\n<p><a href=\"https:\/\/www.botreetechnologies.com\/ruby-on-rails-development\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Click here for more details&#8230;<\/strong><\/a><\/p>\n\n\n\n<p><strong><a href=\"https:\/\/www.botreetechnologies.com\/contact\" target=\"_blank\" rel=\"noopener noreferrer\">Consulting is free<\/a> &#8211; let us help you grow!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Authorization is the most important thing when it comes to&#8230;<\/p>\n","protected":false},"author":23,"featured_media":13611,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73,10],"tags":[],"class_list":["post-3601","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ruby-on-rails","category-technology"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Google API Authorization with Ruby using long lasting Refresh Token<\/title>\n<meta name=\"description\" content=\"The long-lasting refresh token enables easy Google API authorization using Ruby. Here&#039;s how you can implement that for authorization in your Rails application.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Google API Authorization with Ruby using long lasting Refresh Token\" \/>\n<meta property=\"og:description\" content=\"The long-lasting refresh token enables easy Google API authorization using Ruby. Here&#039;s how you can implement that for authorization in your Rails application.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/\" \/>\n<meta property=\"og:site_name\" content=\"BoTree Technologies\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/BoTreeTechnologies\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-19T11:25:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-24T06:06:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/google-api-authorization-with-ruby-on-rails.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"683\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Tejaswini Patil\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@BoTreeTech\" \/>\n<meta name=\"twitter:site\" content=\"@BoTreeTech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tejaswini Patil\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/\"},\"author\":{\"name\":\"Tejaswini Patil\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1a3ecba0676a15b503dfc2dab4f8821f\"},\"headline\":\"Google API Authorization with Ruby using long lasting Refresh Token\",\"datePublished\":\"2018-06-19T11:25:55+00:00\",\"dateModified\":\"2023-01-24T06:06:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/\"},\"wordCount\":627,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/google-api-authorization-with-ruby-on-rails.jpg\",\"articleSection\":[\"Ruby on Rails\",\"Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/\",\"name\":\"Google API Authorization with Ruby using long lasting Refresh Token\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/google-api-authorization-with-ruby-on-rails.jpg\",\"datePublished\":\"2018-06-19T11:25:55+00:00\",\"dateModified\":\"2023-01-24T06:06:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1a3ecba0676a15b503dfc2dab4f8821f\"},\"description\":\"The long-lasting refresh token enables easy Google API authorization using Ruby. Here's how you can implement that for authorization in your Rails application.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/#primaryimage\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/google-api-authorization-with-ruby-on-rails.jpg\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/google-api-authorization-with-ruby-on-rails.jpg\",\"width\":1024,\"height\":683,\"caption\":\"Google API Authorization with Ruby on Rails\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.botreetechnologies.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Google API Authorization with Ruby using long lasting Refresh Token\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/\",\"name\":\"BoTree Technologies\",\"description\":\"Committed to inspire generation.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.botreetechnologies.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1a3ecba0676a15b503dfc2dab4f8821f\",\"name\":\"Tejaswini Patil\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/tejaswini-patil-150x150.png\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/tejaswini-patil-150x150.png\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/tejaswini-patil-150x150.png\",\"caption\":\"Tejaswini Patil\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Google API Authorization with Ruby using long lasting Refresh Token","description":"The long-lasting refresh token enables easy Google API authorization using Ruby. Here's how you can implement that for authorization in your Rails application.","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:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/","og_locale":"en_US","og_type":"article","og_title":"Google API Authorization with Ruby using long lasting Refresh Token","og_description":"The long-lasting refresh token enables easy Google API authorization using Ruby. Here's how you can implement that for authorization in your Rails application.","og_url":"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/","og_site_name":"BoTree Technologies","article_publisher":"https:\/\/www.facebook.com\/BoTreeTechnologies\/","article_published_time":"2018-06-19T11:25:55+00:00","article_modified_time":"2023-01-24T06:06:07+00:00","og_image":[{"width":1024,"height":683,"url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/google-api-authorization-with-ruby-on-rails.jpg","type":"image\/jpeg"}],"author":"Tejaswini Patil","twitter_card":"summary_large_image","twitter_creator":"@BoTreeTech","twitter_site":"@BoTreeTech","twitter_misc":{"Written by":"Tejaswini Patil","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/#article","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/"},"author":{"name":"Tejaswini Patil","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1a3ecba0676a15b503dfc2dab4f8821f"},"headline":"Google API Authorization with Ruby using long lasting Refresh Token","datePublished":"2018-06-19T11:25:55+00:00","dateModified":"2023-01-24T06:06:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/"},"wordCount":627,"commentCount":0,"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/google-api-authorization-with-ruby-on-rails.jpg","articleSection":["Ruby on Rails","Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/","url":"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/","name":"Google API Authorization with Ruby using long lasting Refresh Token","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/#primaryimage"},"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/google-api-authorization-with-ruby-on-rails.jpg","datePublished":"2018-06-19T11:25:55+00:00","dateModified":"2023-01-24T06:06:07+00:00","author":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1a3ecba0676a15b503dfc2dab4f8821f"},"description":"The long-lasting refresh token enables easy Google API authorization using Ruby. Here's how you can implement that for authorization in your Rails application.","breadcrumb":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/#primaryimage","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/google-api-authorization-with-ruby-on-rails.jpg","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/google-api-authorization-with-ruby-on-rails.jpg","width":1024,"height":683,"caption":"Google API Authorization with Ruby on Rails"},{"@type":"BreadcrumbList","@id":"https:\/\/www.botreetechnologies.com\/blog\/google-api-authorization-with-ruby-using-long-lasting-refresh-token\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.botreetechnologies.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Google API Authorization with Ruby using long lasting Refresh Token"}]},{"@type":"WebSite","@id":"https:\/\/www.botreetechnologies.com\/blog\/#website","url":"https:\/\/www.botreetechnologies.com\/blog\/","name":"BoTree Technologies","description":"Committed to inspire generation.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.botreetechnologies.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1a3ecba0676a15b503dfc2dab4f8821f","name":"Tejaswini Patil","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/tejaswini-patil-150x150.png","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/tejaswini-patil-150x150.png","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/tejaswini-patil-150x150.png","caption":"Tejaswini Patil"}}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/3601","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=3601"}],"version-history":[{"count":3,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/3601\/revisions"}],"predecessor-version":[{"id":18452,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/3601\/revisions\/18452"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media\/13611"}],"wp:attachment":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=3601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=3601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=3601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}