{"id":12621,"date":"2024-06-25T13:59:56","date_gmt":"2024-06-25T10:59:56","guid":{"rendered":"https:\/\/availo.app\/?post_type=documents&#038;p=12621"},"modified":"2024-06-25T13:59:59","modified_gmt":"2024-06-25T10:59:59","slug":"generate-token","status":"publish","type":"documents","link":"https:\/\/availo.app\/en\/documents\/%d9%85%d8%b3%d8%aa%d9%86%d8%af%d8%a7%d8%aa-api\/generate-token\/","title":{"rendered":"Generate Token"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p><strong>Link: <\/strong><a href=\"https:\/\/availo-testingintegrationapi.t2.sa\/api\/ExternalReports\/GetDailyAttendanceReport\" target=\"_blank\" rel=\"noopener\">{Base_Url}\/api\/Account\/Generatetoken<\/a><\/p>\n\n\n\n<p><strong>Method Type: <\/strong>POST<\/p>\n\n\n\n<p><strong>Content Type: <\/strong>Application\/Json<\/p>\n\n\n\n<p><strong>Description<\/strong><strong>: <\/strong>Returns an access token to use as a header key of other APIs if used the OAuth2 authentication. (This code will activate for 15 minutes only)<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong><em>Request object:<\/em><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Field<\/td><td>Required<\/td><td>Type<\/td><td>Description<\/td><\/tr><tr><td><br>AccountCode<\/td><td><br>Yes<\/td><td><br>string<\/td><td>The code Id of your account<\/td><\/tr><tr><td><br>Password<\/td><td><br><br>Yes<\/td><td><br>string<\/td><td>The password that got it from the Availo team<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Sample Request:<\/strong><br><img fetchpriority=\"high\" decoding=\"async\" width=\"693\" height=\"212\" src=\"https:\/\/lh7-us.googleusercontent.com\/docsz\/AD_4nXdXHoPSgwgnGSXtIAaRaT3gluprRx-g1Ab_uk3A3vrwhp7O2af1v85JOKYB6j5a8XwgRxViLkBSdlZC2qeHO0yGljRerI9jeRaUOvEdloHSexU3H0yd3A_8EnaBDH0allrL39VDH2B_6BuE2XVwg588D2xrAfgcR2EXo0OyMDrnEybmCMNwJw?key=WUHE52LkYm1PA8Dh8uOA8Q\" alt=\"Graphical user interface, text, application, email  Description automatically generated\"><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Response object:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Field<\/td><td>Required<\/td><td>type<\/td><td>Description<\/td><\/tr><tr><td><br>Data.accessToken<\/td><td><br>Yes<\/td><td><br>string<\/td><td><br>The access token that needs to use as a header key of the otherAPIs<\/td><\/tr><tr><td><br>status<\/td><td><br>Yes<\/td><td><br>bool<\/td><td><br>If the request is a success or not<\/td><\/tr><tr><td><br>message<\/td><td><br>No<\/td><td><br>string<\/td><td><br>The error message that returns from the request<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Sample Response:<\/strong><br><img decoding=\"async\" width=\"678\" height=\"303\" src=\"https:\/\/lh7-us.googleusercontent.com\/docsz\/AD_4nXfKl8NofYVXiCSrT0cEJG-miHW1295hH3EJS1RkGgl9mh2QN-r5UiKmOkSp5bYllqIoowbH_uwkMnFe7eWNp7Ruy2Ieb9MPHEwoRVhuu59nTQrAp24EN75puL7zfkEABN7wSbskMMxGsiOsBIAHvkZHD51BjBwx19pVJfy68vriCLhMyRggsw?key=WUHE52LkYm1PA8Dh8uOA8Q\" alt=\"Graphical user interface, text, application  Description automatically generated\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Link: {Base_Url}\/api\/Account\/Generatetoken Method Type: POST Content Type: Application\/Json Description: Returns an access token to use as a header key of other APIs if used the OAuth2 authentication. (This code will activate for 15 minutes only) Request object: Field Required Type Description AccountCode Yes string The code Id of your account Password Yes string The password [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":12458,"menu_order":0,"template":"","_links":{"self":[{"href":"https:\/\/availo.app\/en\/wp-json\/wp\/v2\/documents\/12621"}],"collection":[{"href":"https:\/\/availo.app\/en\/wp-json\/wp\/v2\/documents"}],"about":[{"href":"https:\/\/availo.app\/en\/wp-json\/wp\/v2\/types\/documents"}],"author":[{"embeddable":true,"href":"https:\/\/availo.app\/en\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":0,"href":"https:\/\/availo.app\/en\/wp-json\/wp\/v2\/documents\/12621\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/availo.app\/en\/wp-json\/wp\/v2\/documents\/12458"}],"wp:attachment":[{"href":"https:\/\/availo.app\/en\/wp-json\/wp\/v2\/media?parent=12621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}