{"id":135,"date":"2020-05-29T05:37:22","date_gmt":"2020-05-29T05:37:22","guid":{"rendered":"https:\/\/172.18.14.109\/docs\/?page_id=135"},"modified":"2021-12-24T06:30:31","modified_gmt":"2021-12-24T14:30:31","slug":"otp-authentication-api","status":"publish","type":"page","link":"https:\/\/console.centagatecloud.com\/docs\/?page_id=135","title":{"rendered":"OTP Authentication API"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"135\" class=\"elementor elementor-135\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e333a4b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e333a4b\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-bdfd969\" data-id=\"bdfd969\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a222cbf elementor-widget elementor-widget-spacer\" data-id=\"a222cbf\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ab231ce elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ab231ce\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5543170\" data-id=\"5543170\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-bd36bc8 elementor-widget elementor-widget-heading\" data-id=\"bd36bc8\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">OTP Authentication API<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ab7184d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ab7184d\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7888c75\" data-id=\"7888c75\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-cd89d83 elementor-widget elementor-widget-text-editor\" data-id=\"cd89d83\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<p>This authentication functions to verify the username with the OTP combination.<\/p>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-0cdf676 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0cdf676\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6a94c62\" data-id=\"6a94c62\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4268a84 elementor-widget elementor-widget-text-editor\" data-id=\"4268a84\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<p>Below is the URL to access the API functions:<\/p>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e49b0cd elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e49b0cd\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-31ebb42\" data-id=\"31ebb42\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-cbc1343 elementor-widget elementor-widget-heading\" data-id=\"cbc1343\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Parameters<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-66eec67 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"66eec67\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c0d7bdc\" data-id=\"c0d7bdc\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d3c68d1 elementor-widget elementor-widget-code-block-for-elementor\" data-id=\"d3c68d1\" data-element_type=\"widget\" data-widget_type=\"code-block-for-elementor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<pre class='theme-twilight' data-show-toolbar='yes'><code class='language-http'>POST \/v2\/CentagateWS\/webresources\/auth\/authOtp<\/code><\/pre>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e762e31 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e762e31\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a4c9440\" data-id=\"a4c9440\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e8f5095 elementor-widget elementor-widget-htmega-datatable-addons\" data-id=\"e8f5095\" data-element_type=\"widget\" data-widget_type=\"htmega-datatable-addons.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t        <div class=\"htmega-table-style htmega-table-style-2 htb-table-responsive\">\r\n            <table class=\"htb-table \">\r\n                                    <thead>\r\n                        <tr>\r\n                            <th class='elementor-repeater-item-a7a52bd'>No<\/th><th class='elementor-repeater-item-f4062f7'>Parameters<\/th><th class='elementor-repeater-item-cfaa113'>Occurence<\/th><th class='elementor-repeater-item-94c9dd5'>Descriptions<\/th>                        <\/tr>\r\n                    <\/thead>\r\n                                <tbody>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-19949df\" >1<\/td><td class=\"elementor-repeater-item-0aa440c\" >username<\/td><td class=\"elementor-repeater-item-1dcb2e1\" >Required<\/td><td class=\"elementor-repeater-item-a731ed6\" >Registered Username In CENTAGATE Cloud.<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-c7a7c0f\" >2<\/td><td class=\"elementor-repeater-item-c9ea842\" >DevAccId<\/td><td class=\"elementor-repeater-item-1863382\" >Optional<\/td><td class=\"elementor-repeater-item-bb7108d\" >The Device Account IDs.<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-0d7e920\" >3<\/td><td class=\"elementor-repeater-item-d84540c\" >Otp<\/td><td class=\"elementor-repeater-item-c5d6d82\" >Required<\/td><td class=\"elementor-repeater-item-fc6e95c\" >The Generated OTP Code.<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-654afd0\" >4<\/td><td class=\"elementor-repeater-item-ee4fa98\" >AuthToken<\/td><td class=\"elementor-repeater-item-f7de40f\" >Optional<\/td><td class=\"elementor-repeater-item-9351671\" >The Previous Generated AuthToken.<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-863a690\" >5<\/td><td class=\"elementor-repeater-item-590b2e9\" >IntegrationKey<\/td><td class=\"elementor-repeater-item-eb74886\" >Required<\/td><td class=\"elementor-repeater-item-2d8cb73\" >Integration Key Of The App That The User Wants To Authenticate<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-e8b84d2\" >6<\/td><td class=\"elementor-repeater-item-a19751d\" >UnixTimestamp<\/td><td class=\"elementor-repeater-item-284d92c\" >Required<\/td><td class=\"elementor-repeater-item-2bea754\" >Current Time In Unixtimestamp.<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-d93b5ce\" >7<\/td><td class=\"elementor-repeater-item-d187bc9\" >SupportFido<\/td><td class=\"elementor-repeater-item-25d2925\" >Optional<\/td><td class=\"elementor-repeater-item-bea63c9\" >FIDO Authentication Option, Pass True To Enable And False To Disable. Or Leave It Empty.<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-22d907f\" >8<\/td><td class=\"elementor-repeater-item-41a31ee\" >IpAddress<\/td><td class=\"elementor-repeater-item-cdfa3b5\" >Optional<\/td><td class=\"elementor-repeater-item-4cf35b8\" >IP Address From Where The Authentication Request Is Originated.<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-d9b8d02\" >9<\/td><td class=\"elementor-repeater-item-2f3d9ce\" >UserAgent<\/td><td class=\"elementor-repeater-item-cc47aa7\" >Optional<\/td><td class=\"elementor-repeater-item-f2a6f82\" >Platform Information Of Authentication Request Is Made Of.<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-27b0938\" >10<\/td><td class=\"elementor-repeater-item-35d8de0\" >BrowserFp<\/td><td class=\"elementor-repeater-item-090d3e3\" >Optional<\/td><td class=\"elementor-repeater-item-e7d795b\" >Browser Fingerprint.<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-6ba412d\" >11<\/td><td class=\"elementor-repeater-item-fecd18e\" >HMAC<\/td><td class=\"elementor-repeater-item-c68cc6a\" >Required<\/td><td class=\"elementor-repeater-item-0bb64e6\" >Hmac Generated From Combination (Username + DevAccId + Otp + UserAgent + IntegrationKey + SupportFido + BrowserFp + UnixTimeStamp + AuthToken + IpAddress) Using Secretkey (Can Be Obtained From The App Page) As The Key<\/td>                        <\/tr>\r\n                                    <\/tbody>\r\n            <\/table>\r\n        <\/div>\r\n        \t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-fe68376 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"fe68376\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-decf9ef\" data-id=\"decf9ef\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d3c56fe elementor-widget elementor-widget-spacer\" data-id=\"d3c56fe\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-2b17f30 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2b17f30\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-85b167a\" data-id=\"85b167a\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f9d82ca elementor-widget elementor-widget-heading\" data-id=\"f9d82ca\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-xl\">Sample Code<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-c61a56f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"c61a56f\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-26b3c34\" data-id=\"26b3c34\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4592d54 elementor-widget elementor-widget-text-editor\" data-id=\"4592d54\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<p>As in below there are some examples of source code of access the API functions:<\/p>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-14a99cc elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"14a99cc\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ec77314\" data-id=\"ec77314\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4fb9216 elementor-tabs-view-horizontal elementor-widget elementor-widget-tabs\" data-id=\"4fb9216\" data-element_type=\"widget\" data-widget_type=\"tabs.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-tabs\">\n\t\t\t<div class=\"elementor-tabs-wrapper\" role=\"tablist\" >\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-8351\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"true\" data-tab=\"1\" role=\"tab\" tabindex=\"0\" aria-controls=\"elementor-tab-content-8351\" aria-expanded=\"false\"><a href=\"\">Java<\/a><\/div>\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-8352\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"false\" data-tab=\"2\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-8352\" aria-expanded=\"false\"><a href=\"\">Node Js<\/a><\/div>\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-8353\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"false\" data-tab=\"3\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-8353\" aria-expanded=\"false\"><a href=\"\">PHP<\/a><\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t<div class=\"elementor-tabs-content-wrapper\" role=\"tablist\" aria-orientation=\"vertical\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"true\" data-tab=\"1\" role=\"tab\" tabindex=\"0\" aria-controls=\"elementor-tab-content-8351\" aria-expanded=\"false\">Java<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-8351\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"1\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-8351\" tabindex=\"0\" hidden=\"false\"><p>\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"3764\" class=\"elementor elementor-3764\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-68e245e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"68e245e\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-79f2d39\" data-id=\"79f2d39\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-260c466 elementor-widget elementor-widget-code-block-for-elementor\" data-id=\"260c466\" data-element_type=\"widget\" data-widget_type=\"code-block-for-elementor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<pre class='line-numbers theme-tomorrow-night' data-show-toolbar='yes'><code class='language-java'>public static void main(String[] args) {\r\n\r\n\tClientConfig config = new DefaultClientConfig ();\r\n\tClient client = Client.create ( config );\r\n\tWebResource service = client.resource (&quot;https:\/\/&lt;domain_name&gt;\/v2\/CentagateWS\/webresources&quot;);\r\n\t\t\t\r\n\tGson gson = new Gson();\r\n\t\t\t\r\n\tString hmac = convertHmacSha256(&quot;secretkey&quot;,&quot;username&quot; + &quot;devAccId&quot; + &quot;otp&quot; + &quot;authToken&quot; + &quot;integrationKey&quot; + &quot;unixTimestamp&quot; + &quot;supportFido&quot; + &quot;ipAddress&quot; + &quot;userAgent&quot; + &quot;browserFp&quot;);\r\n\r\n\tHashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();\r\n\tmap.put(&quot;username&quot;, &quot;username&quot;);\r\n\tmap.put(&quot;devAccId&quot;, &quot;devAccId&quot;);\r\n\tmap.put(&quot;otp&quot;, &quot;otp&quot;);\r\n\tmap.put(&quot;authToken&quot;, &quot;authToken&quot;);\r\n\tmap.put(&quot;integrationKey&quot;, &quot;integrationKey&quot;);\r\n\tmap.put(&quot;unixTimestamp&quot;, &quot;unixTimeStamp&quot;);\r\n\tmap.put(&quot;ipAddress&quot;, &quot;ipAddress&quot;); \r\n\tmap.put(&quot;userAgent&quot;, &quot;userAgent&quot;); \r\n\tmap.put(&quot;browserFp&quot;, &quot;browserFp&quot;); \r\n\tmap.put(&quot;supportFido&quot;, &quot;&quot;); \r\n\tmap.put(&quot;hmac&quot;, hmac); \r\n\r\n\tClientResponse response = service.path (&quot;auth&quot;).path(&quot;authOtp&quot;).accept(MediaType.APPLICATION_JSON).post(ClientResponse.class, gson.toJson(map));\r\n\t\t\t\t\r\n\tString retJson = response.getEntity(String.class);\r\n\r\n\tHashMap&lt;String, Object&gt; returnData = (HashMap&lt;String, Object&gt;) gson.fromJson(retJson, HashMap.class);\r\n\r\n\tString code = returnData.get(&quot;code&quot;).toString();\r\n\tString message = returnData.get(&quot;message&quot;).toString();\r\n\tString object = returnData.get(&quot;object&quot;).toString();\r\n}\r\n\r\npublic static String convertHmacSha256(String secretKey, String params) throws NoSuchAlgorithmException, \r\n            InvalidKeyException,IllegalStateException, SignatureException, NoSuchProviderException, Exception\r\n{\r\n\ttry\r\n\t{\r\n\t\tfinal SecretKeySpec secret_key = new SecretKeySpec ( StringUtils.getBytesUtf8 ( secretKey ) , &quot;HmacSHA256&quot; );\r\n\t\tfinal Mac mac = Mac.getInstance ( &quot;HmacSHA256&quot; );\r\n\t\tmac.init ( secret_key );\r\n\t\tfinal byte[] bytes = mac.doFinal ( StringUtils.getBytesUtf8 ( params ) );\r\n\t\treturn Hex.encodeHexString ( bytes );\r\n\t}\r\n\tcatch ( NoSuchAlgorithmException e )\r\n\t{\r\n\t\tthrow new NoSuchAlgorithmException ( e );\r\n\t}\r\n\tcatch ( InvalidKeyException e )\r\n\t{\r\n\t\tthrow new InvalidKeyException ( e );\r\n\t}\r\n\tcatch ( IllegalStateException e )\r\n\t{\r\n\t\tthrow new IllegalStateException ( e );\r\n\t}\r\n\tcatch ( Exception e )\r\n\t{\r\n\t\tthrow new Exception ( e );\r\n\t}\r\n}<\/code><\/pre>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/p><\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"false\" data-tab=\"2\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-8352\" aria-expanded=\"false\">Node Js<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-8352\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"2\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-8352\" tabindex=\"0\" hidden=\"hidden\"><p>\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"3766\" class=\"elementor elementor-3766\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3177d04 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3177d04\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-be288bb\" data-id=\"be288bb\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4669679 elementor-widget elementor-widget-code-block-for-elementor\" data-id=\"4669679\" data-element_type=\"widget\" data-widget_type=\"code-block-for-elementor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<pre class='line-numbers theme-tomorrow-night' data-show-toolbar='yes'><code class='language-javascript'>const https = require('https')\r\n\r\nvar crypto = require('crypto');\r\nvar username = '&lt;username&gt;';\r\nvar devAccId = '&lt;devAccId&gt;';\r\nvar otp = '&lt;otp&gt;';\r\nvar integrationKey = '&lt;integration key&gt;';\r\n\r\nvar time = Math.round((new Date()).getTime() \/ 1000);\r\nvar unixTimestamp = time.toString();\r\nvar authToken = &quot;&lt;authToken&gt;&quot;;\r\n\r\nvar supportFido = &quot;&lt;supportFido&gt;&quot;;\r\nvar ipAddress = &quot;&lt;ipAddress&gt;&quot;;\r\nvar userAgent = &quot;&lt;userAgent&gt;&quot;;\r\nvar browserFp = &quot;&lt;browserFp&gt;&quot;;\r\n\r\nvar secretKey    = '&lt;secret key&gt;';\r\nvar algorithm = 'sha256';  \r\nvar hmacText = username + devAccId + otp + integrationKey + unixTimestamp + authToken + supportFido + ipAddress + userAgent + browserFp;\r\nvar hash, hmac;\r\n\r\n\/* generate hmac value*\/\r\nhmac = crypto.createHmac(algorithm, secretKey);    \r\nhmac.write(hmacText);\r\nhmac.end();      \r\nhash = hmac.read().toString('hex');    \r\n\r\n\r\nconst data = JSON.stringify({\r\n\tusername: username,\r\n\tdevAccId: devAccId,\r\n\totp: otp,\r\n\tauthToken: authToken,\r\n\tintegrationKey: integrationKey,\r\n\tunixTimestamp: unixTimestamp,\r\n\tipAddress: ipAddress,\r\n\tsupportFido: supportFido,\r\n\tuserAgent: userAgent,\r\n\tbrowserFp: browserFp,\r\n\thmac: hash\r\n})\r\n\r\nconst options = {\r\n\thostname: &quot;&lt;domain_name&gt;&quot;,\r\n\tport: 443,\r\n\tpath:'\/v2\/CentagateWS\/webresources\/auth\/authOtp',\r\n\tmethod: 'POST',\r\n\theaders: {\r\n\t\t'Accept': 'application\/json',\r\n\t\t'Content-Type': 'application\/json',\r\n\t}\r\n}\r\n\r\nconst req = https.request(options, res =&gt;{\r\n\tconsole.log(`HTTP Status Code: ${res.statusCode}`)\r\n\tvar body = '';\r\n\tres.on('data', function(d){\r\n\t\t\r\n\tbody += d;\r\n\tvar parsed = JSON.parse(body);\r\n\t\r\n\tif (parsed.code == 0){\r\n\t   console.log('Authentication Succeed');\r\n\t   console.log('Response:');\r\n\t   console.log(body);\r\n\t}\r\n\telse {\r\n\t  console.log('Authentication Fail, ' +'Message:' + parsed.message);\r\n\t  console.log('Code:' + parsed.code); \r\n\t}\r\n\t\t\r\n\t})\r\n})\r\n\r\nreq.on('ERROR', error =&gt; {\r\n\tconsole.error(error)\r\n})\r\n\r\nreq.write(data)\r\nreq.end()<\/code><\/pre>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/p><\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"false\" data-tab=\"3\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-8353\" aria-expanded=\"false\">PHP<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-8353\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"3\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-8353\" tabindex=\"0\" hidden=\"hidden\"><p>\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"3768\" class=\"elementor elementor-3768\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-34dd011 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"34dd011\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-35c8842\" data-id=\"35c8842\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2c92845 elementor-widget elementor-widget-code-block-for-elementor\" data-id=\"2c92845\" data-element_type=\"widget\" data-widget_type=\"code-block-for-elementor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<pre class='line-numbers theme-tomorrow-night' data-show-toolbar='yes'><code class='language-php'>&lt;?php\r\n\r\n    $url = 'https:\/\/&lt;domain_name&gt;\/v2\/CentagateWS\/webresources\/auth\/authOtp';\r\n    \r\n    $ch = curl_init($url);\r\n    $integrationKey = &quot;&lt;integrationkey&gt;&quot;;\r\n    $secretKey = &quot;&lt;secretkey&gt;&quot;;\r\n    $username =&quot;&lt;username&gt;&quot;;\r\n    $devAccId = &quot;&lt;devAccId&gt;&quot;;\r\n    $otp = &quot;&lt;otp&gt;&quot;;\r\n    $time = time(); \/\/ get current timestamp\r\n    $unixTimestamp = strval($time); \/\/convert timestamp to String\r\n    $authToken = &quot;&lt;authToken&gt;&quot;;\r\n    $supportFido = &quot;&lt;supportFido&gt;&quot;;\r\n    $ipAddress = &quot;&lt;ipAddress&gt;&quot;;\r\n    $userAgent = &quot;&lt;userAgent&gt;&quot;;\r\n    $browserFp = &quot;&lt;browserFp&gt;&quot;;\r\n    \r\n    $hmac_text = $username.$devAccId.$otp.$authToken.$integrationKey.$unixTimestamp.$supportFido.$ipAddress.$userAgent.$browserFp;\r\n    $hmac = hash_hmac('sha256', $hmac_text, $secretKey); \/\/ calculate hmac value\r\n    \r\n    $jsonData = array (\r\n    \t'username'=&gt; $username,\r\n    \t'devAccId'=&gt; $devAccId,\r\n    \t'otp'=&gt; $otp,\r\n    \t'integrationKey'=&gt; $integrationKey,\r\n    \t'authToken'=&gt; $authToken,\r\n    \t'unixTimestamp'=&gt; $unixTimestamp,\r\n    \t'supportFido'=&gt; $supportFido,\r\n    \t'ipAddress'=&gt; $ipAddress,\r\n    \t'userAgent'=&gt; $userAgent,\r\n    \t'browserFp'=&gt; $browserFp,\r\n    \t'hmac' =&gt; $hmac\r\n    \t\r\n    );\r\n    \r\n    $jsonDataEncoded = json_encode($jsonData);\r\n    \r\n    curl_setopt($ch, CURLOPT_POST,1);\r\n    curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);\r\n    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application\/json','Content-Type: application\/json'));\r\n    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n    \r\n    $result = curl_exec($ch);\r\n    \r\n    \r\n    $obj = json_decode($result); \r\n    if ($obj-&gt;{'code'} != 0){\r\n    \tprint &quot;Authentication fail&quot;;\r\n    \tprint &quot;Message: &quot;.$obj-&gt;{'message'}; \r\n    \techo &quot; &lt;br&gt;&quot;; \r\n    \tprint &quot;Code: &quot;.$obj-&gt;{'code'};\r\n    }\r\n    else {\r\n    \tprint &quot;Authentication succeed&quot;;\r\n    \techo &quot; &lt;br&gt;&quot;; \r\n    \tprint &quot;Message: &quot;.$obj-&gt;{'message'}; \r\n    \techo &quot; &lt;br&gt;&quot;; \r\n    \tprint &quot;Code: &quot;.$obj-&gt;{'code'}; \r\n    \techo &quot; &lt;br&gt;&quot;; \r\n    \tprint &quot;Result:&quot; ;\r\n    \techo &quot; &lt;br&gt;&quot;; \r\n    \tprint $result;\r\n    }\r\n    \r\n    curl_close($ch);\r\n\r\n?&gt;<\/code><\/pre>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/p><\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>OTP Authentication API This authentication functions to verify the username with the OTP combination. Below is the URL to access the API functions: Parameters POST \/v2\/CentagateWS\/webresources\/auth\/authOtp No Parameters Occurence Descriptions 1 username Required Registered Username In CENTAGATE Cloud. 2 DevAccId Optional The Device Account IDs. 3 Otp Required The Generated OTP Code. 4 AuthToken Optional [&hellip;]<\/p>\n<a class=\"read-more-tag\" \n         href=\"https:\/\/console.centagatecloud.com\/docs\/?page_id=135\">&nbsp;Read More<\/a>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/console.centagatecloud.com\/docs\/index.php?rest_route=\/wp\/v2\/pages\/135"}],"collection":[{"href":"https:\/\/console.centagatecloud.com\/docs\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/console.centagatecloud.com\/docs\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/console.centagatecloud.com\/docs\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/console.centagatecloud.com\/docs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=135"}],"version-history":[{"count":51,"href":"https:\/\/console.centagatecloud.com\/docs\/index.php?rest_route=\/wp\/v2\/pages\/135\/revisions"}],"predecessor-version":[{"id":5783,"href":"https:\/\/console.centagatecloud.com\/docs\/index.php?rest_route=\/wp\/v2\/pages\/135\/revisions\/5783"}],"wp:attachment":[{"href":"https:\/\/console.centagatecloud.com\/docs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}