{"id":185067,"date":"2021-06-08T07:03:48","date_gmt":"2021-06-08T14:03:48","guid":{"rendered":"https:\/\/m2msupport.net\/m2msupport\/?page_id=185067"},"modified":"2021-06-08T07:03:50","modified_gmt":"2021-06-08T14:03:50","slug":"unexpected-exception-reading-pkcs8-data-reading-private-key","status":"publish","type":"page","link":"https:\/\/m2msupport.net\/m2msupport\/unexpected-exception-reading-pkcs8-data-reading-private-key\/","title":{"rendered":"Unexpected exception reading PKCS#8 data &#8211; Reading private key"},"content":{"rendered":"<p>Applications needs to pass the service account credentials in the Google Cloud API calls. This error occurs when the private key in the service account JSON file is corrupted.<\/p>\n<p><a href=\"https:\/\/m2msupport.net\/m2msupport\/download-iot-cloud-tester\/\">IoT Cloud Tester<\/a>&nbsp; application provides an easy interface to test this error. Google Cloud Platform.<\/p>\n<h1>How to fix &#8211;&nbsp; Error getting access token for service account<\/h1>\n<ul>\n<li>Verify&nbsp; the private key in the service account JSON file in not corrupted. This can be checked in the Google Cloud Console.<\/li>\n<\/ul>\n<p>In the below example, a service account JSON file with corrupted private key is passed to trigger this error condition.<\/p>\n<p><a href=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/reading_key_error.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-185068\" src=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/reading_key_error.png\" alt=\"\" width=\"843\" height=\"724\" srcset=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/reading_key_error.png 843w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/reading_key_error-300x258.png 300w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/reading_key_error-768x660.png 768w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/reading_key_error-600x515.png 600w\" sizes=\"auto, (max-width: 843px) 100vw, 843px\" \/><\/a><\/p>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<div class=\"video-responsive\"><iframe loading=\"lazy\" id=\"youTubePlayer\" src=\"https:\/\/www.youtube.com\/embed\/2Ia4cEVB1rg?hd=1\" width=\"750\" height=\"421\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Applications needs to pass the service account credentials in the Google Cloud API calls. This error occurs when the private key in the service account JSON file is corrupted. IoT Cloud Tester&nbsp; application provides an easy interface to test this &hellip; <a href=\"https:\/\/m2msupport.net\/m2msupport\/unexpected-exception-reading-pkcs8-data-reading-private-key\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"iot_tutorial_template.php","meta":{"footnotes":""},"class_list":["post-185067","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/185067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/comments?post=185067"}],"version-history":[{"count":1,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/185067\/revisions"}],"predecessor-version":[{"id":185069,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/185067\/revisions\/185069"}],"wp:attachment":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/media?parent=185067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}