{"id":186135,"date":"2021-06-13T17:13:37","date_gmt":"2021-06-14T00:13:37","guid":{"rendered":"https:\/\/m2msupport.net\/m2msupport\/?page_id=186135"},"modified":"2021-06-13T17:14:49","modified_gmt":"2021-06-14T00:14:49","slug":"cloud-iot-api-has-not-been-used-in-project-before-or-it-is-disabled","status":"publish","type":"page","link":"https:\/\/m2msupport.net\/m2msupport\/cloud-iot-api-has-not-been-used-in-project-before-or-it-is-disabled\/","title":{"rendered":"Cloud IoT API has not been used in project  before or it is disabled"},"content":{"rendered":"<p>The Cloud IoT API should be enabled for the project in Google Cloud Platform before using that API in the application. If not enabled, API error message is returned.<\/p>\n<p>When the Cloud IoT API is not enabled when verifying the service account ,&nbsp;<a href=\"https:\/\/m2msupport.net\/m2msupport\/download-iot-cloud-tester\/\">IoT Cloud Tester<\/a>&nbsp; application will return the error.<\/p>\n<p><a href=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/enable_cloud_iot_api_app_error.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-186136\" src=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/enable_cloud_iot_api_app_error.png\" alt=\"\" width=\"841\" height=\"729\" srcset=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/enable_cloud_iot_api_app_error.png 841w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/enable_cloud_iot_api_app_error-300x260.png 300w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/enable_cloud_iot_api_app_error-768x666.png 768w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/enable_cloud_iot_api_app_error-600x520.png 600w\" sizes=\"auto, (max-width: 841px) 100vw, 841px\" \/><\/a><\/p>\n<p>Following error message is returned by Google Cloud API.<\/p>\n<p>403 Forbidden<br \/>\nGET https:\/\/cloudiot.googleapis.com\/v1\/projects\/second-inquiry-315605\/locations\/asia-east1\/registries<br \/>\n{<br \/>\n&#8220;code&#8221; : 403,<br \/>\n&#8220;errors&#8221; : [ {<br \/>\n&#8220;domain&#8221; : &#8220;usageLimits&#8221;,<br \/>\n&#8220;message&#8221; : &#8220;Cloud IoT API has not been used in project 496777850585 before or it is disabled. Enable it by visiting https:\/\/console.developers.google.com\/apis\/api\/cloudiot.googleapis.com\/overview?project=496777850585 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.&#8221;,<br \/>\n&#8220;reason&#8221; : &#8220;accessNotConfigured&#8221;,<br \/>\n&#8220;extendedHelp&#8221; : &#8220;https:\/\/console.developers.google.com&#8221;<br \/>\n} ],<br \/>\n&#8220;message&#8221; : &#8220;Cloud IoT API has not been used in project 496777850585 before or it is disabled. Enable it by visiting https:\/\/console.developers.google.com\/apis\/api\/cloudiot.googleapis.com\/overview?project=496777850585 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.&#8221;,<br \/>\n&#8220;status&#8221; : &#8220;PERMISSION_DENIED&#8221;<br \/>\n}<\/p>\n<h1>To fix this error, enable the Cloud IoT API in GCP,<\/h1>\n<ul>\n<li>Enable Cloud Pub\/Sub API in GCP by visiting the below URL for the project &#8211;&nbsp;https:\/\/console.cloud.google.com\/apis\/library\/cloudiot.googleapis.com?authuser=2&amp;project=second-inquiry-315605<\/li>\n<\/ul>\n<p><a href=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/enable_cloud_iot_api_in_gcp.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-186137\" src=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/enable_cloud_iot_api_in_gcp.png\" alt=\"\" width=\"1738\" height=\"874\" srcset=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/enable_cloud_iot_api_in_gcp.png 1738w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/enable_cloud_iot_api_in_gcp-300x151.png 300w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/enable_cloud_iot_api_in_gcp-768x386.png 768w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/enable_cloud_iot_api_in_gcp-1024x515.png 1024w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/enable_cloud_iot_api_in_gcp-600x302.png 600w\" sizes=\"auto, (max-width: 1738px) 100vw, 1738px\" \/><\/a><\/p>\n<div class=\"video-responsive\"><iframe loading=\"lazy\" id=\"youTubePlayer\" src=\"https:\/\/www.youtube.com\/embed\/nZ9QsV7YeJQ?hd=1\" width=\"750\" height=\"421\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The Cloud IoT API should be enabled for the project in Google Cloud Platform before using that API in the application. If not enabled, API error message is returned. When the Cloud IoT API is not enabled when verifying the &hellip; <a href=\"https:\/\/m2msupport.net\/m2msupport\/cloud-iot-api-has-not-been-used-in-project-before-or-it-is-disabled\/\">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-186135","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/186135","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=186135"}],"version-history":[{"count":1,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/186135\/revisions"}],"predecessor-version":[{"id":186138,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/186135\/revisions\/186138"}],"wp:attachment":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/media?parent=186135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}