{"id":27040,"date":"2021-03-17T05:52:27","date_gmt":"2021-03-17T05:52:27","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-2\/?p=27040"},"modified":"2022-09-28T07:12:52","modified_gmt":"2022-09-28T06:12:52","slug":"alert-task-oauth-v2-password-grant-type","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-2\/docs\/bots\/bot-builder-tool\/alert\/alert-task-oauth-v2-password-grant-type\/","title":{"rendered":"Alert Task \u2013 OAuth v2 Password Grant Type"},"content":{"rendered":"<p><span style=\"font-weight: 400\">We have seen how an Alert Task can be set up in the Kore.ai XO Platform <\/span><a href=\"https:\/\/developer.kore.ai\/v10-2\/docs\/bots\/bot-builder-tool\/alert\/notification-tasks\/\"><span style=\"font-weight: 400\">here<\/span><\/a><span style=\"font-weight: 400\">. In this article , we will see how authorization for the alert tasks can be set up using the OAuth v2 with password grant.<\/span><\/p>\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\n<h1><span class=\"ez-toc-section\" id=\"General_Setup\"><span style=\"font-weight: 400\">General Setup<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">OAuth v2 is the new version of the open protocol to allow secure authorization in a simple and standard method from web, mobile, and desktop applications. To use oAuth v2, you must first register an account with the web application as you will need the log-in credentials for that application to configure the settings for the Authorization Mechanism.<\/span><\/p>\n<p><span style=\"font-weight: 400\">To begin your configuration, follow the steps below:<\/span><\/p>\n<ul>\n<ul>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select the <\/span><strong>VA <\/strong><span style=\"font-weight: 400\">you want to work with.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Go to <\/span><strong>Build &gt; Conversation Skills &gt; Alert Tasks<\/strong><span style=\"font-weight: 400\">.&nbsp;<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select the <\/span><strong>task <\/strong><span style=\"font-weight: 400\">you want to work with.&nbsp;<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the <\/span><strong>API Request<\/strong><span style=\"font-weight: 400\"> tab within the Alert Task.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Expand the <\/span><strong>Authorization <\/strong><span style=\"font-weight: 400\">section and click <\/span><strong>Create New<\/strong><span style=\"font-weight: 400\"> to configure a new authorization. <\/span><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065806\/new-auth-1-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-45810\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065806\/new-auth-1-1-1024x426.png\" alt=\"\" width=\"399\" height=\"166\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065806\/new-auth-1-1-1024x426.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065806\/new-auth-1-1-300x125.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065806\/new-auth-1-1.png 1145w\" sizes=\"auto, (max-width: 399px) 100vw, 399px\" \/><\/a>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Next, the <\/span><strong>New Authorization Mechanism<\/strong><span style=\"font-weight: 400\"> window opens, as shown in the illustration below.&nbsp;<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065811\/oauthv2pgt-config.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-45813\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065811\/oauthv2pgt-config-666x1024.png\" alt=\"\" width=\"328\" height=\"505\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065811\/oauthv2pgt-config-666x1024.png 666w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065811\/oauthv2pgt-config-195x300.png 195w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065811\/oauthv2pgt-config.png 700w\" sizes=\"auto, (max-width: 328px) 100vw, 328px\" \/><\/a><br \/><\/span><\/li>\n<\/ul>\n<\/ul>\n<\/ul>\n<p><span style=\"font-weight: 400\">To define a custom authorization, select <strong>oAuth v2 password grant<\/strong> in the <strong>Authorization Type<\/strong> field. Then specify a <strong>Name<\/strong> for the authorization to be displayed in the XO Platform&nbsp; user interface. Next, configure each section as follows:<\/span><\/p>\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\n<h1><span class=\"ez-toc-section\" id=\"Tenancy\"><span style=\"font-weight: 400\">Tenancy<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">If required, in the <\/span><strong>Subdomain<\/strong><span style=\"font-weight: 400\"> section, select <\/span><strong>Yes<\/strong><span style=\"font-weight: 400\"> if the base URL for a web application or user interface uses a tenant name in the URL. For example, <\/span><span style=\"font-weight: 400\">kore<\/span><span style=\"font-weight: 400\"> is the tenant organization for a web service using tenants as <\/span><span style=\"font-weight: 400\">www.<\/span><strong><em>kore<\/em><\/strong><span style=\"font-weight: 400\">.someCompany.com.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In the following example configuration, the tenancy URL contains the <\/span><span style=\"font-weight: 400\">{tenant}<\/span><span style=\"font-weight: 400\"> organization placeholder.<\/span><\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065746\/tenancy-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-45795\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065746\/tenancy-1.png\" alt=\"\" width=\"826\" height=\"222\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065746\/tenancy-1.png 826w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065746\/tenancy-1-300x81.png 300w\" sizes=\"auto, (max-width: 826px) 100vw, 826px\" \/><\/a><\/p>\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\n<h1><span class=\"ez-toc-section\" id=\"Form_Fields\"><span style=\"font-weight: 400\">Form Fields<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">If the default username and password fields do not meet your needs, you can add new fields displayed to the end-user by adding authorization form fields. To add fields on the authorization form, click <\/span><strong>+ Add Form Field<\/strong><span style=\"font-weight: 400\">.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The following illustration is an example of a definition to add a password field to the authorization dialog.<\/span><\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065802\/form-fields-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-45807\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065802\/form-fields-1.png\" alt=\"\" width=\"380\" height=\"454\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065802\/form-fields-1.png 679w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065802\/form-fields-1-251x300.png 251w\" sizes=\"auto, (max-width: 380px) 100vw, 380px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">The following table describes the fields used to define an authorization IDP form field.<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<th>\n<p><strong>FIELD NAME<\/strong><\/p>\n<\/th>\n<th>\n<p><strong>DESCRIPTION<\/strong><\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400\">Field Title<\/span><\/p>\n<\/td>\n<td>\n<p><span style=\"font-weight: 400\">Specify the name of the field displayed to the end-user in the authentication dialog.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400\">Field Key<\/span><\/p>\n<\/td>\n<td>\n<p><span style=\"font-weight: 400\">The value represents the end-user input value to the authenticating service.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400\">Help Hint<\/span><\/p>\n<\/td>\n<td>\n<p><span style=\"font-weight: 400\">The help text displayed in the field to describe what should be entered into the field.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400\">Field Type<\/span><\/p>\n<\/td>\n<td>\n<p><span style=\"font-weight: 400\">When <\/span><strong>Advanced Options<\/strong><span style=\"font-weight: 400\"> is selected, specify the type of field displayed in the end-user interface to collect the user input assigned as the value for the <\/span><strong>Field Key<\/strong><span style=\"font-weight: 400\">, one of:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><strong>Textbox<\/strong><\/li>\n<li style=\"font-weight: 400\"><strong>Password<\/strong><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400\">Mandatory<\/span><\/p>\n<\/td>\n<td>\n<p><span style=\"font-weight: 400\">When <\/span><strong>Advanced Options<\/strong><span style=\"font-weight: 400\"> is selected, select if the end-user must define this field to complete authentication.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400\">Data Type<\/span><\/p>\n<\/td>\n<td>\n<p><span style=\"font-weight: 400\">When <\/span><strong>Advanced Options<\/strong><span style=\"font-weight: 400\"> is selected, specify the type of data expected as input from the end-user, for example, <\/span><strong>String<\/strong><span style=\"font-weight: 400\">.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400\">Visibility<\/span><\/p>\n<\/td>\n<td>\n<p><span style=\"font-weight: 400\">When <\/span><strong>Advanced Options<\/strong><span style=\"font-weight: 400\"> is selected, specify if the authentication field should be visible, hidden, or displayed as read-only.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\n<h1><span class=\"ez-toc-section\" id=\"Authorization_Fields\"><span style=\"font-weight: 400\">Authorization Fields<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">By default, authorization fields are configured as part of the header of the task request message. If your task request requires additional authorization fields or the expected authorization is not part of the header, for example, social security number or PIN, click<\/span><strong> + Add Authorization Field <\/strong><span style=\"font-weight: 400\">and then define the fields as shown in the following illustration.&nbsp;<\/span><\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065758\/add-auth-field.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-45804\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065758\/add-auth-field.png\" alt=\"\" width=\"498\" height=\"223\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065758\/add-auth-field.png 699w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065758\/add-auth-field-300x134.png 300w\" sizes=\"auto, (max-width: 498px) 100vw, 498px\" \/><\/a><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">In the <\/span><strong>Field Type<\/strong><span style=\"font-weight: 400\"> field, you can select one of the following depending on where in the task request message and the type of authorization fields that are required.<\/span><\/li>\n<ol>\n<li style=\"font-weight: 400\"><strong>Header<\/strong><span style=\"font-weight: 400\"> &ndash; The VA expects the authorization fields as part of the header of the request.<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>Payload<\/strong><span style=\"font-weight: 400\"> &ndash; The VA expects the authorization fields as part of the content of the body of the request.<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>Query String<\/strong><span style=\"font-weight: 400\"> &ndash; The VA expects the authorization fields as a query in the body of the request.<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>Path Param<\/strong><span style=\"font-weight: 400\"> &ndash; The VA expects the authorization fields as part of the URL path for the request.<\/span><\/li>\n<\/ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">In the <\/span><strong>Field Key<\/strong><span style=\"font-weight: 400\"> field, enter the name of the field for the selected <\/span><strong>Field Type<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">In the <\/span><strong>Field Value<\/strong><span style=\"font-weight: 400\"> field, enter the value for the <\/span><strong>Field Key<\/strong><span style=\"font-weight: 400\"> specified.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Done<\/strong><span style=\"font-weight: 400\">. The new authorization field is added in the <\/span><strong>Authorization Fields<\/strong><span style=\"font-weight: 400\"> section.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\">To add additional authorization fields, click <\/span><strong>Add<\/strong><span style=\"font-weight: 400\"> in the <\/span><strong>Authorization Fields<\/strong><span style=\"font-weight: 400\"> section.<\/span><\/p>\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\n<h1><span class=\"ez-toc-section\" id=\"Token_URL\"><span style=\"font-weight: 400\">Token URL<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">To define the token URL, follow the below steps:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">In the <\/span><strong>Token URL<\/strong><span style=\"font-weight: 400\"> field, optionally define a URL that can be used to test the authentication settings from the XO Platform&nbsp; before you deploy the task with the authorization mechanism. You can use dynamic fields, path parameter fields, query fields, and so forth, to define the test URL, for example,<\/span><span style=\"font-weight: 400\"><br \/><\/span><span style=\"font-weight: 400\">http:\/\/{tenant}.someCompany.com\/test\/{{tokenId}}<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">In the <\/span><strong>Token URL Method<\/strong><span style=\"font-weight: 400\"> field, select the HTTP request method type for the <\/span><strong>Token URL<\/strong><span style=\"font-weight: 400\">. One of <\/span><strong>PUT<\/strong><span style=\"font-weight: 400\">, <\/span><strong>POST<\/strong><span style=\"font-weight: 400\">, <\/span><strong>PATCH<\/strong><span style=\"font-weight: 400\">, <\/span><strong>DELETE,<\/strong><span style=\"font-weight: 400\"> and <\/span><strong>GET<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">In the <\/span><strong>Token URL Content Type<\/strong><span style=\"font-weight: 400\"> field, select the content type expected from the <\/span><strong>Token URL<\/strong><span style=\"font-weight: 400\">. One of: <\/span><strong>JSON, RSS, XML, URL Encoded JSON, CSV, Text, Twitter Encoded JSON, Multipart\/Form-data,Multipart\/Related<\/strong><span style=\"font-weight: 400\">, or <\/span><strong>Oracle ADF<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">In the <\/span><strong>Refresh Token URL<\/strong><span style=\"font-weight: 400\">, enter the refresh token URL if required.&nbsp;<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">For situations when there may be authentication errors, enter the <\/span><strong>Auth Error Status Code<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\">Click <\/span><strong>Save Auth<\/strong><span style=\"font-weight: 400\"> to save the authorization settings and close the <\/span><strong>New Authorization Mechanism<\/strong><span style=\"font-weight: 400\"> dialog.<\/span><\/p>\n<p><span style=\"font-weight: 400\">&nbsp;<\/span><\/p>\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\n<h1><span class=\"ez-toc-section\" id=\"Testing\"><span style=\"font-weight: 400\">Testing<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">To test your authorization, follow the below steps:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">After you save the authentication, if you have defined an <\/span><strong>Authorization URL<\/strong><span style=\"font-weight: 400\"> for your new authorization type, you can test your authorization definition on the <\/span><strong>Authorization <\/strong><span style=\"font-weight: 400\">page when you click <\/span><strong>Test Authorization<\/strong><span style=\"font-weight: 400\"> before continuing to develop the remaining steps of your task.<\/span><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928064424\/test-authorization-1-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-45784\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928064424\/test-authorization-1-1.png\" alt=\"\" width=\"619\" height=\"135\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928064424\/test-authorization-1-1.png 977w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928064424\/test-authorization-1-1-300x65.png 300w\" sizes=\"auto, (max-width: 619px) 100vw, 619px\" \/><\/a><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">After you click <\/span><strong>Test Authorization<\/strong><span style=\"font-weight: 400\">, the <\/span><strong>Test Authorization<\/strong><span style=\"font-weight: 400\"> window is displayed and populated with the URL you specified in the <\/span><strong>Authorization Check URL<\/strong><span style=\"font-weight: 400\"> section, as shown in the following illustration.<\/span><span style=\"font-weight: 400\"><br \/><\/span><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065750\/testauth.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-45798\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065750\/testauth.png\" alt=\"\" width=\"282\" height=\"295\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065750\/testauth.png 591w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065750\/testauth-286x300.png 286w\" sizes=\"auto, (max-width: 282px) 100vw, 282px\" \/><\/a><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Test<\/strong><span style=\"font-weight: 400\"> to begin the authorization test. When the validation of authentication is complete, the <\/span><strong>Test Authorization<\/strong><span style=\"font-weight: 400\"> window is closed and the results of the validation, either success or failure, is displayed to the immediate right of the <\/span><strong>Test Authorization<\/strong><span style=\"font-weight: 400\"> button. If the authorization fails, the <\/span><em><span style=\"font-weight: 400\">Auth Test Failed<\/span><\/em><span style=\"font-weight: 400\"> message is displayed along with the <\/span><strong>Headers<\/strong><span style=\"font-weight: 400\"> and <\/span><strong>Response<\/strong><span style=\"font-weight: 400\"> tabs as shown in the following illustration.<br \/>\n<\/span><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065754\/test-failure-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-45801\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065754\/test-failure-1.png\" alt=\"\" width=\"353\" height=\"250\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065754\/test-failure-1.png 578w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20220928065754\/test-failure-1-300x212.png 300w\" sizes=\"auto, (max-width: 353px) 100vw, 353px\" \/><\/a><\/li>\n<\/ol>\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We have seen how an Alert Task can be set up in the Kore.ai XO Platform here. In this article , we will see how authorization for the alert tasks can be set up using the OAuth v2 with password grant. General Setup OAuth v2 is the new version of the open protocol to allow&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67],"tags":[],"class_list":["post-27040","post","type-post","status-publish","format-standard","hentry","category-alert"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/posts\/27040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/comments?post=27040"}],"version-history":[{"count":3,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/posts\/27040\/revisions"}],"predecessor-version":[{"id":45816,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/posts\/27040\/revisions\/45816"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/media?parent=27040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/categories?post=27040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/tags?post=27040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}