Authorize using GET

GET {{authPath}}/{{envID}}/davinci/policy/{{davinciFlowPolicyID}}/authorize?client_id={{clientID}}&response_type=code&scope=openid%20profile&redirect_uri={{redirect_uri}}

The authorization endpoint is used to interact with the end user and obtain an authorization grant. The sample shows the GET {{authPath}}/{{envID}}/davinci/policy/{{davinciFlowPolicyID}}/authorize?client_id={{clientID}}&response_type=code&scope=openid%20profile&redirect_uri={{redirect_uri}} operation.

In this example, the request URL includes the response_type parameter with a value of code, which designates that this authorization request, if successful, returns an authorization code that is exchanged for an access token.

Prerequisites

PropertyDescription
client_idA string that specifies the application's ID.
redirect_uriA URL that specifies the return entry point of the application.
response_typeA string that specifies the code or token type returned by an authorization request.
scopeA string that specifies permissions that determine the resources that the application can access. This parameter is needed to specify accessible resources.

Request Params

KeyDatatypeRequiredDescription
client_idstringclient ID.
response_typestringresponse type .
scopestringscope.
redirect_uristringredirect uri

RESPONSES

status: OK

"\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n    \u003chead\u003e\n        \u003c!-- Flow loading props--\u003e\n        \u003ctitle\u003eDaVinci Authentication Widget\u003c/title\u003e\n        \u003c!-- singularkey-styles--\u003e\n        \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\"\u003e\n        \u003clink href=\"https://auth.pingone.com/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/davinci/flows/3e0603680cbde668577a5eacc6c22987/css\" rel=\"stylesheet\" type=\"text/css\"\u003e\n        \u003clink rel=\"shortcut icon\" href=\"https://assets.singularkey.com/assets/favicon-davinci.png\"\u003e\n        \u003c!-- Load custom css files from flow settings--\u003e\n        \u003clink href=\"https://assets.pingone.com/ux/end-user/1.7.0/end-user.css\" rel=\"stylesheet\" crossorigin=\"anonymous\"\u003e\n        \u003cscript src=\"https://code.jquery.com/jquery-3.6.0.min.js\" integrity=\"sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==\" crossorigin=\"anonymous\"\u003e\u003c/script\u003e\n    \u003c/head\u003e\n    \u003cbody\u003e\n        \u003c!-- Flow loading props--\u003e\n        \u003cdiv\u003e\n            \u003cdiv id=\"widgetContainer\"\u003e\u003c/div\u003e\n        \u003c/div\u003e\n        \u003c!-- Load react-sk widget--\u003e\n        \u003cscript src=\"https://assets.pingone.com/davinci/latest/davinci.js\"\u003e\u003c/script\u003e\n        \u003cscript type=\"text/javascript\"\u003evar skProps = {\"id\":\"howu8n9hsc\",\"companyId\":\"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6\",\"flowId\":\"3e0603680cbde668577a5eacc6c22987\",\"connectionId\":\"867ed4363b2bc21c860085ad2baa817d\",\"capabilityName\":\"customHTMLTemplate\",\"screen\":{\"name\":\"HTTP\",\"properties\":{\"sktemplate\":{\"type\":\"string\",\"displayName\":\"Template\",\"createdDate\":1657665418265,\"customerId\":\"ecb9bf8a2fab854e65045d02cb6bab50\",\"companyId\":\"singularkey\"},\"customHTML\":{\"type\":\"string\",\"displayName\":\"HTML Template\",\"createdDate\":1657665418205,\"customerId\":\"ecb9bf8a2fab854e65045d02cb6bab50\",\"companyId\":\"singularkey\",\"preferredControlType\":\"textArea\",\"enableParameters\":true,\"maximizeToggle\":true,\"viewToggle\":true,\"largePayload\":true,\"value\":\"\n            \u003cdiv class=\\\"app-container\\\" style=\\\"display: block;\\\"\u003e\\n\\t\n                \u003cdiv class=\\\"page__content\\\" style=\\\"height: 100%;\\\"\u003e\\n\\t\\t\n                    \u003cdiv class=\\\"card card--no-padding\\\"\u003e\\n\\t\\t\\t\n                        \u003cdiv class=\\\"card__content\\\"\u003e\\n\\t\\t\\t\\t\n                            \u003cdiv class=\\\"org-logo\\\"\u003e\\n\\t\\t\\t\\t\\t\n                                \u003cimg class=\\\"org-logo__image\\\" src=\\\"https://d3uinntk0mqu3p.cloudfront.net/branding/market/a3d073bc-3108-49ad-b96c-404bea59a1d0.png\\\" alt=\\\"Company Logo\\\" /\u003e\\n\\t\\t\\t\\t\n                            \u003c/div\u003e\\n\\t\\t\\t\\t\n                            \u003cdiv data-skcomponent=\\\"skerror\\\" class=\\\"feedback feedback--error sk-alert sk-alert-danger has-text-danger has-background-danger-light\\\" data-id=\\\"feedback\\\" data-skvisibility=\\\"\\\"\u003e\u003c/div\u003e\\n\\t\\t\\t\\t\n                            \u003cform class=\\\"form\\\" id='usernamePasswordForm' data-id=\\\"usernamePasswordForm\\\"\u003e\\n\\t\\t\\t\\t\\t\n                                \u003cdiv class=\\\"field float-label\\\"\u003e\\n\\t\\t\\t\\t\\t\\t\n                                    \u003cinput class=\\\"text-input float-label__input\\\" data-id=\\\"username-input\\\" id=\\\"username\\\" name=\\\"username\\\" type=\\\"text\\\" autocomplete=\\\"on\\\" value=\\\"\\\" /\u003e\\n\\t\\t\\t\\t\\t\\t\n                                    \u003clabel class=\\\"float-label__label\\\" for=\\\"username\\\"\u003eUsername\u003c/label\u003e\\n\\t\\t\\t\\t\\t\n                                \u003c/div\u003e\\n\\t\\t\\t\\t\\t\n                                \u003cdiv class=\\\"field float-label\\\"\u003e\\n\\t\\t\\t\\t\\t\\t\n                                    \u003cinput class=\\\"text-input text-input--pasword float-label__input\\\" data-id=\\\"password-input\\\" id=\\\"password\\\" name=\\\"password\\\" type=\\\"password\\\" autocomplete=\\\"on\\\" value=\\\"\\\" /\u003e\\n\\t\\t\\t\\t\\t\\t\n                                    \u003clabel class=\\\"float-label__label\\\" for=\\\"password\\\"\u003ePassword\u003c/label\u003e\\n\\t\\t\\t\\t\\t\n                                \u003c/div\u003e\\n\\t\\t\\t\\t\\t\n                                \u003cdiv class=\\\"control\\\"\u003e\\n\\t\\t\\t\\t\\t\\t\n                                    \u003cbutton class=\\\"field is-primary mt-2 button file-input--button button--primary brand-primary-bg\\\" data-id=\\\"button\\\" type=\\\"submit\\\" data-skcomponent=\\\"skbutton\\\" data-skbuttontype=\\\"form-submit\\\" data-skform=\\\"usernamePasswordForm\\\" data-skbuttonvalue=\\\"submit\\\"\u003e\\n                            Sign On\\n\\t\\t\\t\\t\\t\\t\\t\n                                        \u003ci class=\\\"fas fa-forward ml-2\\\"\u003e\u003c/i\u003e\\n\\t\\t\\t\\t\\t\\t\n                                    \u003c/button\u003e\\n\\t\\t\\t\\t\\t\n                                \u003c/div\u003e\\n\\t\\t\\t\\t\\t\n                                \u003cdiv class=\\\"control\\\"\u003e\\n                        \n                                    \u003cdiv style=\\\"width: 100%; text-align: center;\\\"\u003e\\n                            \n                                        \u003cbutton type=\\\"submit\\\" class=\\\"buttonLink is-primary is-inverted mt-2\\\" data-skcomponent=\\\"skbutton\\\" data-skbuttontype=\\\"form-submit\\\" data-skform=\\\"usernamePasswordForm\\\" data-skbuttonvalue=\\\"forgotPassword\\\"\u003e\\n                                Forgot Password\\n                                \n                                            \u003ci class=\\\"fas fa-forward ml-2\\\"\u003e\u003c/i\u003e\\n\n                                        \u003c/button\u003e\\n\n                                    \u003c/div\u003e\\n\\t\\t\\t\\t\\t\n                                \u003c/div\u003e\\n\\t\\t\\t\\t\n                            \u003c/form\u003e\\n\\t\\t\\t\n                        \u003c/div\u003e\\n\\t\\t\n                    \u003c/div\u003e\\n\\t\n                \u003c/div\u003e\\n\n            \u003c/div\u003e\\n\"},\"validationRules\":{\"type\":\"object\",\"displayName\":\"Form validation rules\",\"value\":[],\"info\":\"Rules to check to validate form inputs\",\"createdDate\":1657665418203,\"customerId\":\"ecb9bf8a2fab854e65045d02cb6bab50\",\"companyId\":\"singularkey\",\"preferredControlType\":\"validationRules\"},\"customCSS\":{\"type\":\"string\",\"displayName\":\"CSS\",\"createdDate\":1657665418313,\"customerId\":\"ecb9bf8a2fab854e65045d02cb6bab50\",\"companyId\":\"singularkey\",\"preferredControlType\":\"codeEditor\",\"language\":\"css\",\"maximizeToggle\":true,\"largePayload\":true},\"customScript\":{\"type\":\"string\",\"displayName\":\"Script\",\"createdDate\":1657665418314,\"customerId\":\"ecb9bf8a2fab854e65045d02cb6bab50\",\"companyId\":\"singularkey\",\"preferredControlType\":\"codeEditor\",\"value\":\"\",\"language\":\"javascript\",\"maximizeToggle\":true},\"inputSchema\":{\"type\":\"string\",\"displayName\":\"Input Schema\",\"createdDate\":1657665418286,\"customerId\":\"ecb9bf8a2fab854e65045d02cb6bab50\",\"companyId\":\"singularkey\",\"preferredControlType\":\"codeEditor\",\"language\":\"json\",\"info\":\"Follow example for JSON schema.\",\"maximizeToggle\":true},\"outputSchema\":{\"type\":\"string\",\"displayName\":\"Output Schema\",\"createdDate\":1657665418168,\"customerId\":\"ecb9bf8a2fab854e65045d02cb6bab50\",\"companyId\":\"singularkey\",\"preferredControlType\":\"codeEditor\",\"language\":\"json\",\"info\":\"Follow example for JSON schema.\",\"maximizeToggle\":true},\"formFieldsList\":{\"type\":\"array\",\"constructType\":\"formFieldsList\",\"displayName\":\"Output Fields List\",\"createdDate\":1657665418278,\"customerId\":\"ecb9bf8a2fab854e65045d02cb6bab50\",\"companyId\":\"singularkey\",\"preferredControlType\":\"formFieldsList\",\"hideLabel\":false,\"value\":[{\"preferredControlType\":\"textField\",\"preferredDataType\":\"string\",\"propertyName\":\"username\",\"displayName\":\"Username\",\"hashedVisibility\":false},{\"preferredControlType\":\"textField\",\"preferredDataType\":\"string\",\"propertyName\":\"password\",\"displayName\":\"Password\",\"hashedVisibility\":true},{\"preferredControlType\":\"textField\",\"preferredDataType\":\"string\",\"propertyName\":\"buttonValue\"}]},\"challenge\":{\"type\":\"string\",\"displayName\":\"Challenge\",\"createdDate\":1657665418279,\"customerId\":\"ecb9bf8a2fab854e65045d02cb6bab50\",\"companyId\":\"singularkey\",\"preferredControlType\":\"textField\",\"enableParameters\":true},\"button\":{\"constructType\":\"button\",\"displayName\":\"Submit\",\"createdDate\":1657665418275,\"customerId\":\"ecb9bf8a2fab854e65045d02cb6bab50\",\"companyId\":\"singularkey\",\"logo\":\"\",\"showLogo\":true,\"preferredControlType\":\"button\",\"css\":{\"backgroundColor\":\"#1CAB42\",\"color\":\"#ffffff\"},\"onClick\":{\"constructType\":\"skEvent\",\"eventName\":\"continue\",\"params\":[],\"eventType\":\"post\",\"postProcess\":{}}},\"nodeTitle\":{\"value\":\"Username/Password Form\"}},\"userViews\":[{\"screenTemplateName\":\"CustomHTMLTemplate\",\"items\":[{\"propertyName\":\"sktemplate\"},{\"propertyName\":\"customHTML\"},{\"propertyName\":\"validationRules\"},{\"propertyName\":\"customCSS\"},{\"propertyName\":\"customScript\"},{\"propertyName\":\"inputSchema\"},{\"propertyName\":\"outputSchema\"},{\"propertyName\":\"formFieldsList\"},{\"propertyName\":\"challenge\"},{\"propertyName\":\"button\"}]}],\"metadata\":{\"colors\":{\"canvas\":\"#AFD5FF\",\"canvasText\":\"#253746\",\"dark\":\"#2E5EA6\"},\"logos\":{\"canvas\":{\"imageFileName\":\"http.svg\"}}}},\"interactionId\":\"030f161d-8a3f-47c0-87e6-29bb9b4fe9df\",\"interactionToken\":\"ac26ef5b6c8c44d267a912c6a1f2ed13cfdaa3a8418b177bc6b2dfb9afb9cf2d1176d66f674c98b30cb24e25df0c8f550f279ee9d16605136d44ee126dc4c45784bb37101954c7e0009c6a2d2aba85d889dc9517ca869778d76a6e8c175ca2ca715181309d2444c2dfbd81e8dd9df90f9bb53cf17e7b30c61415110b5119931f\",\"skProxyApiEnvironmentId\":\"us-west-2\"}\nvar skLoadingProps = {\"intermediateLoadingScreenHTML\":null,\"intermediateLoadingScreenCSS\":null,\"customTitle\":null,\"customFaviconLink\":null}\n\nfunction processCallback(payload) {}\nfunction loadIt(){\n    var param = {config: skProps, skLoadingProps}\n\n    davinci.renderScreen($('#widgetContainer').get(0), param, processCallback)\n}\nloadIt()\n        \u003c/script\u003e\n        \u003c!-- Load custom javascript files from flow settings--\u003e\n    \u003c/body\u003e\n\u003c/html\u003e"