{"id":17,"date":"2021-09-16T04:38:38","date_gmt":"2021-09-16T04:38:38","guid":{"rendered":"http:\/\/6142c8bbb0922e001657a26d"},"modified":"2021-11-09T12:26:39","modified_gmt":"2021-11-09T12:26:39","slug":"401-unauthorized-error-in-postman-when-used-along-with-grandstreams-ip-pbx","status":"publish","type":"post","link":"https:\/\/jazchye.com\/index.php\/2021\/09\/16\/401-unauthorized-error-in-postman-when-used-along-with-grandstreams-ip-pbx\/","title":{"rendered":"401 Unauthorized Error in POSTMAN when used along with Grandstream&#8217;s IP PBX"},"content":{"rendered":"<p><a href=\"https:\/\/www.postman.com\/\">POSTMAN<\/a> is a collaboration platform for API development. Postman&#8217;s features simplify each step of building an API and streamline collaboration so you can create better APIs\u2014faster. Thanks to its affordable pricing, most users now will integrate Postman along with their PBX applications for building an API.<\/p>\n<p>Grandstream&#8217;s <a href=\"http:\/\/www.grandstream.com\/products\/ip-pbxs\">IP PBX<\/a> supports API integrations, including HTTPS API, CDRAPI, and REC.<\/p>\n<p>API. While integrating UCM with POSTMAN, one might face issues, and one of the most common issues is &#8211;<\/p>\n<h2><strong>401 Unauthorized Error in POSTMAN<\/strong><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21\" src=\"http:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_1.jpg\" alt=\"\" width=\"1314\" height=\"706\" srcset=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_1.jpg 1314w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_1-300x161.jpg 300w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_1-1024x550.jpg 1024w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_1-768x413.jpg 768w\" sizes=\"auto, (max-width: 1314px) 100vw, 1314px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22\" src=\"http:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_2.jpg\" alt=\"\" width=\"510\" height=\"206\" srcset=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_2.jpg 510w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_2-300x121.jpg 300w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/p>\n<figure><\/figure>\n<figure><\/figure>\n<p>GET request was done with the correct CDRAPI URL format as per this <a href=\"http:\/\/www.grandstream.com\/sites\/default\/files\/Resources\/ucm6xxx_cdr_rec_api_guide.pdf\">CDRAPI guide<\/a> from the Grandstream website.<\/p>\n<p>Now let&#8217;s look back at the configurations &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-23\" src=\"http:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_3.jpg\" alt=\"\" width=\"1395\" height=\"752\" srcset=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_3.jpg 1395w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_3-300x162.jpg 300w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_3-1024x552.jpg 1024w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_3-768x414.jpg 768w\" sizes=\"auto, (max-width: 1395px) 100vw, 1395px\" \/><\/p>\n<figure><\/figure>\n<p>API port 8443 was used and the IP address has been whitelisted under Permitted IP(s).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24\" src=\"http:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_4.jpg\" alt=\"\" width=\"1335\" height=\"552\" srcset=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_4.jpg 1335w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_4-300x124.jpg 300w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_4-1024x423.jpg 1024w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_4-768x318.jpg 768w\" sizes=\"auto, (max-width: 1335px) 100vw, 1335px\" \/><\/p>\n<figure><\/figure>\n<p>Digest Authentication was used and credentials are correct. So&#8230; why is there a 401Unauthorized Error?<\/p>\n<p><strong><u>Cause:<\/u><\/strong><\/p>\n<p>It was found out that the user is using Postman for Chrome. Postman for Chrome requires users to import generate their own SSL certificates and import them into Postman for it to be used.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-25\" src=\"http:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_5.jpg\" alt=\"\" width=\"1270\" height=\"852\" srcset=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_5.jpg 1270w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_5-300x201.jpg 300w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_5-1024x687.jpg 1024w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_5-768x515.jpg 768w\" sizes=\"auto, (max-width: 1270px) 100vw, 1270px\" \/><\/p>\n<p>Unfortunately, there is no way to disable using an SSL certificate in Postman for Chrome.<\/p>\n<p><strong><u>Solution:<\/u><\/strong><\/p>\n<p>Use Postman for <a href=\"https:\/\/dl.pstmn.io\/download\/latest\/win64\">Windows<\/a>\/<a href=\"https:\/\/dl.pstmn.io\/download\/latest\/osx\">macOS<\/a>\/<a href=\"https:\/\/dl.pstmn.io\/download\/latest\/linux64\">Linux(64)<\/a>. The advantage of using Postman for Windows is that it allows users to disable SSL certification verification.<\/p>\n<figure><\/figure>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26\" src=\"http:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_6.png\" alt=\"\" width=\"783\" height=\"722\" srcset=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_6.png 783w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_6-300x277.png 300w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/10\/401_6-768x708.png 768w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>POSTMAN is a collaboration platform for API development. Postman&#8217;s features simplify each step of building an API and streamline collaboration so you can create better&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,4,5],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-api","category-ippbx","category-troubleshooting"],"_links":{"self":[{"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":3,"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":161,"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/posts\/17\/revisions\/161"}],"wp:attachment":[{"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}