{"id":1213,"date":"2017-05-30T09:31:08","date_gmt":"2017-05-30T14:31:08","guid":{"rendered":"https:\/\/www.teamdesk.net\/blog\/?p=1213"},"modified":"2017-06-01T10:29:40","modified_gmt":"2017-06-01T15:29:40","slug":"oauth2-authentication-call-url-actions","status":"publish","type":"post","link":"https:\/\/www.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/","title":{"rendered":"OAuth2 authentication in Call URL actions"},"content":{"rendered":"<p>Today we&#8217;ve added\u00a0OAuth2 authentication to <a href=\"https:\/\/www.teamdesk.net\">TeamDesk<\/a> Call URL actions. OAuth2 authentication enables direct integration with services like Google, Microsoft, Salesforce and many more.<br \/>\n<!--more--><br \/>\nCall URL action&#8217;s setup now features Authorization section. Type dropdown allows you to choose between:<\/p>\n<ul>\n<li>None &#8211; if API you are calling does not require authorization at all;<\/li>\n<li>Basic &#8211; if API requires basic user\/password authorization. Prior to this change we handled this case via Authorization header, it still works this way.<\/li>\n<li>and now you can choose Generic OAuth2 for authentication with OAuth2 enabled services.<\/li>\n<\/ul>\n<p><!--more-->OAuth2 is a method to authorize the <em>application<\/em> (TeamDesk database(s) in this case) to access user&#8217;s resources such as calendars, mails, notes and files without providing the<em> application<\/em> with user&#8217;s credentials. While secure, initial setup might seem a bit complicated.<\/p>\n<p>First you need to register <em>application<\/em> with service provider.<\/p>\n<h2>Setting up OAuth2 with Google APIs<\/h2>\n<ul>\n<li>Navigate to <a href=\"https:\/\/console.developers.google.com\">Google developer&#8217;s console<\/a> and create new project.<\/li>\n<li>Enable Google APIs you are planning to call.<\/li>\n<li>Set up OAuth Consent Screen.<\/li>\n<li>Add credentials, choose OAuth Client ID credential type and Web Application as application type.<\/li>\n<li>Add an URL listed in Call URL&#8217;s action Redirect URL property as an &#8220;Authorized Redirect URI&#8221;<\/li>\n<\/ul>\n<p>Now you have Client ID and Client Secret for use in Call URL actions. <em>Application<\/em> does not necessary mean a single action or database, you can share these credential among multiple databases and actions.<\/p>\n<p>For Call URL action, copy Client ID and Secret, use &#8220;https:\/\/accounts.google.com\/o\/oauth2\/v2\/auth&#8221; as Call URL&#8217;s Authorization URL and &#8220;https:\/\/www.googleapis.com\/oauth2\/v4\/token&#8221; as Token URL properties and provide a <a href=\"https:\/\/developers.google.com\/identity\/protocols\/googlescopes\"><em>scope<\/em><\/a> &#8211; API you are planning to call.<\/p>\n<h2>Setting up OAuth2 with Microsoft APIs<\/h2>\n<ul>\n<li>Navigate to <a href=\"https:\/\/apps.dev.microsoft.com\">Application Registration Portal <\/a>and Register new application.<\/li>\n<li>Then add Web platform to set up Redirect URL.<\/li>\n<li>Generate password to get Client Secret. Save it somewhere, as it is displayed one time.<\/li>\n<li>Application ID listed on a page serves as a Client ID.<\/li>\n<li>Authorization URL is &#8220;https:\/\/login.microsoftonline.com\/common\/oauth2\/v2.0\/authorize&#8221;,<\/li>\n<li>Token URL is &#8220;https:\/\/login.microsoftonline.com\/common\/oauth2\/v2.0\/token&#8221;.<\/li>\n<li>List of scopes for now-recommended Graph API can be found <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/concepts\/permissions_reference\">here<\/a>.<\/li>\n<\/ul>\n<h2>What&#8217;s next?<\/h2>\n<p>Once all required properties set up, clicking Authorize button will navigate you to authorization page provided by the service to select an account and confirm scope requested. Once confirmed, service sends us back <em>authorization code<\/em> that we exchange for <em>access token<\/em> upon save. This access token will be implicitly used in all subsequent API calls.<\/p>\n<h2>Sounds way too complicated?<\/h2>\n<p>For your convenience we&#8217;ve registered <em>applications<\/em> with Google and Microsoft. In TeamDesk databases Call URL&#8217;s authorization type property features two shortcuts named respectively. If you select one of these, all you need is to provide scope for API call.<\/p>\n<p>Enjoy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we&#8217;ve added\u00a0OAuth2 authentication to TeamDesk Call URL actions. OAuth2 authentication enables direct integration with services like Google, Microsoft, Salesforce and many more.<\/p>\n","protected":false},"author":4,"featured_media":1215,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1213","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-whats-new"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>OAuth2 authentication in Call URL actions - TeamDesk Blog<\/title>\n<meta name=\"description\" content=\"Today we&#039;ve added\u00a0OAuth2 authentication to TeamDesk Call URL actions to enable direct integration with services like Google, Microsoft and many more.\" \/>\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.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"OAuth2 authentication in Call URL actions - TeamDesk Blog\" \/>\n<meta property=\"og:description\" content=\"Today we&#039;ve added\u00a0OAuth2 authentication to TeamDesk Call URL actions to enable direct integration with services like Google, Microsoft and many more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/\" \/>\n<meta property=\"og:site_name\" content=\"TeamDesk Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-05-30T14:31:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-06-01T15:29:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2017\/05\/oauth2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"480\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Kirill Bondar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirill Bondar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/oauth2-authentication-call-url-actions\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/oauth2-authentication-call-url-actions\\\/\"},\"author\":{\"name\":\"Kirill Bondar\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/22c4c05bd657513c8b00122fa364c8d2\"},\"headline\":\"OAuth2 authentication in Call URL actions\",\"datePublished\":\"2017-05-30T14:31:08+00:00\",\"dateModified\":\"2017-06-01T15:29:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/oauth2-authentication-call-url-actions\\\/\"},\"wordCount\":468,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/oauth2-authentication-call-url-actions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/05\\\/oauth2.jpg\",\"articleSection\":[\"What's New\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/oauth2-authentication-call-url-actions\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/oauth2-authentication-call-url-actions\\\/\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/oauth2-authentication-call-url-actions\\\/\",\"name\":\"OAuth2 authentication in Call URL actions - TeamDesk Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/oauth2-authentication-call-url-actions\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/oauth2-authentication-call-url-actions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/05\\\/oauth2.jpg\",\"datePublished\":\"2017-05-30T14:31:08+00:00\",\"dateModified\":\"2017-06-01T15:29:40+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/22c4c05bd657513c8b00122fa364c8d2\"},\"description\":\"Today we've added\u00a0OAuth2 authentication to TeamDesk Call URL actions to enable direct integration with services like Google, Microsoft and many more.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/oauth2-authentication-call-url-actions\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/oauth2-authentication-call-url-actions\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/oauth2-authentication-call-url-actions\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/05\\\/oauth2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/05\\\/oauth2.jpg\",\"width\":640,\"height\":480,\"caption\":\"OAuth2\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/oauth2-authentication-call-url-actions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OAuth2 authentication in Call URL actions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/\",\"name\":\"TeamDesk Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/22c4c05bd657513c8b00122fa364c8d2\",\"name\":\"Kirill Bondar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g\",\"caption\":\"Kirill Bondar\"},\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/author\\\/kirill-bondar\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"OAuth2 authentication in Call URL actions - TeamDesk Blog","description":"Today we've added\u00a0OAuth2 authentication to TeamDesk Call URL actions to enable direct integration with services like Google, Microsoft and many more.","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.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/","og_locale":"en_US","og_type":"article","og_title":"OAuth2 authentication in Call URL actions - TeamDesk Blog","og_description":"Today we've added\u00a0OAuth2 authentication to TeamDesk Call URL actions to enable direct integration with services like Google, Microsoft and many more.","og_url":"https:\/\/www.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/","og_site_name":"TeamDesk Blog","article_published_time":"2017-05-30T14:31:08+00:00","article_modified_time":"2017-06-01T15:29:40+00:00","og_image":[{"width":640,"height":480,"url":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2017\/05\/oauth2.jpg","type":"image\/jpeg"}],"author":"Kirill Bondar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirill Bondar","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/#article","isPartOf":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/"},"author":{"name":"Kirill Bondar","@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/22c4c05bd657513c8b00122fa364c8d2"},"headline":"OAuth2 authentication in Call URL actions","datePublished":"2017-05-30T14:31:08+00:00","dateModified":"2017-06-01T15:29:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/"},"wordCount":468,"commentCount":0,"image":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/#primaryimage"},"thumbnailUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2017\/05\/oauth2.jpg","articleSection":["What's New"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/","url":"https:\/\/www.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/","name":"OAuth2 authentication in Call URL actions - TeamDesk Blog","isPartOf":{"@id":"https:\/\/www.teamdesk.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/#primaryimage"},"image":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/#primaryimage"},"thumbnailUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2017\/05\/oauth2.jpg","datePublished":"2017-05-30T14:31:08+00:00","dateModified":"2017-06-01T15:29:40+00:00","author":{"@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/22c4c05bd657513c8b00122fa364c8d2"},"description":"Today we've added\u00a0OAuth2 authentication to TeamDesk Call URL actions to enable direct integration with services like Google, Microsoft and many more.","breadcrumb":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/#primaryimage","url":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2017\/05\/oauth2.jpg","contentUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2017\/05\/oauth2.jpg","width":640,"height":480,"caption":"OAuth2"},{"@type":"BreadcrumbList","@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/oauth2-authentication-call-url-actions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.teamdesk.net\/blog\/"},{"@type":"ListItem","position":2,"name":"OAuth2 authentication in Call URL actions"}]},{"@type":"WebSite","@id":"https:\/\/www.teamdesk.net\/blog\/#website","url":"https:\/\/www.teamdesk.net\/blog\/","name":"TeamDesk Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.teamdesk.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/22c4c05bd657513c8b00122fa364c8d2","name":"Kirill Bondar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g","caption":"Kirill Bondar"},"url":"https:\/\/www.teamdesk.net\/blog\/author\/kirill-bondar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/1213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/comments?post=1213"}],"version-history":[{"count":5,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/1213\/revisions"}],"predecessor-version":[{"id":1232,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/1213\/revisions\/1232"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/media\/1215"}],"wp:attachment":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/media?parent=1213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/categories?post=1213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/tags?post=1213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}