{"id":75,"date":"2017-12-06T20:55:34","date_gmt":"2017-12-07T02:55:34","guid":{"rendered":"http:\/\/varunpramanik.com\/chronicles\/?p=75"},"modified":"2017-12-06T20:55:34","modified_gmt":"2017-12-07T02:55:34","slug":"google-cloud-platform-oauth-redirect-uri-error-resolution","status":"publish","type":"post","link":"https:\/\/varunpramanik.com\/chronicles\/2017\/12\/06\/google-cloud-platform-oauth-redirect-uri-error-resolution\/","title":{"rendered":"Google Cloud Platform OAuth Redirect URI Error Resolution"},"content":{"rendered":"<p>While working on installing <a href=\"https:\/\/github.com\/google\/ds-trix-addon\">an Apps Script<\/a> to a Google Sheet, one step in the instructions required me to add the script project&#8217;s redirect URI to the list of authorized OAuth URIs in the supporting GCP project. Despite being the owner of the project, GCP refused to save my update to the authorized redirect URIs list, presenting me instead with this super informative error message about not having permission to perform the action:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-76 size-large\" src=\"https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.10.53-AM.jpg?resize=840%2C408\" alt=\"\" width=\"840\" height=\"408\" srcset=\"https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.10.53-AM.jpg?resize=1024%2C497&amp;ssl=1 1024w, https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.10.53-AM.jpg?resize=300%2C146&amp;ssl=1 300w, https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.10.53-AM.jpg?resize=768%2C373&amp;ssl=1 768w, https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.10.53-AM.jpg?resize=1200%2C582&amp;ssl=1 1200w, https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.10.53-AM.jpg?w=1286&amp;ssl=1 1286w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>I scoured the internet for an answer and came up with nothing even close to helpful. At my wit&#8217;s end, I decided to give a shot to just creating credentials for a second web application within my GCP project, inputting the necessary redirect URI from my Apps Script project. Lo and behold, this worked and I was successfully able to complete my implementation of the aforementioned script.<\/p>\n<p>The steps are straightforward, but if you do encounter an issue with saving an update to your list of authorized redirect URIs for a web application in GCP, here they are spelled out:<\/p>\n<p>On the \u201cCredentials\u201d page for your GCP project, select\u00a0<em>Create credentials<\/em> &gt;\u00a0<em>OAuth client ID<\/em>.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-77\" src=\"https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.33.51-PM.png?resize=840%2C460\" alt=\"\" width=\"840\" height=\"460\" srcset=\"https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.33.51-PM.png?resize=1024%2C561&amp;ssl=1 1024w, https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.33.51-PM.png?resize=300%2C164&amp;ssl=1 300w, https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.33.51-PM.png?resize=768%2C420&amp;ssl=1 768w, https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.33.51-PM.png?resize=1200%2C657&amp;ssl=1 1200w, https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.33.51-PM.png?w=1432&amp;ssl=1 1432w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>Fill out the form to create a new client ID, with\u00a0\u201cWeb application\u201d under\u00a0<em>Application type<\/em>, some relevant name and the authorized redirect URI you need to use. Click\u00a0<em>Create<\/em> and you will be given a client ID\/client secret pair to use as needed.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-78\" src=\"https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.36.41-PM.png?resize=840%2C706\" alt=\"\" width=\"840\" height=\"706\" srcset=\"https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.36.41-PM.png?resize=1024%2C861&amp;ssl=1 1024w, https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.36.41-PM.png?resize=300%2C252&amp;ssl=1 300w, https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.36.41-PM.png?resize=768%2C646&amp;ssl=1 768w, https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.36.41-PM.png?resize=1200%2C1009&amp;ssl=1 1200w, https:\/\/i0.wp.com\/varunpramanik.com\/chronicles\/wp-content\/uploads\/2017\/12\/Screen-Shot-2017-12-06-at-8.36.41-PM.png?w=1620&amp;ssl=1 1620w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>I hope this post helps shorten your search for a solution if you ever encounter this permissions issue!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While working on installing an Apps Script to a Google Sheet, one step in the instructions required me to add the script project&#8217;s redirect URI to the list of authorized OAuth URIs in the supporting GCP project. Despite being the owner of the project, GCP refused to save my update to the authorized redirect URIs &hellip; <a href=\"https:\/\/varunpramanik.com\/chronicles\/2017\/12\/06\/google-cloud-platform-oauth-redirect-uri-error-resolution\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Google Cloud Platform OAuth Redirect URI Error Resolution&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[15],"tags":[30,29,27,26,28],"class_list":["post-75","post","type-post","status-publish","format-standard","hentry","category-code","tag-apps-script","tag-authorized-redirect-uri","tag-ds-trix","tag-google-cloud-platform","tag-oath"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p7tP59-1d","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/varunpramanik.com\/chronicles\/wp-json\/wp\/v2\/posts\/75","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/varunpramanik.com\/chronicles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/varunpramanik.com\/chronicles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/varunpramanik.com\/chronicles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/varunpramanik.com\/chronicles\/wp-json\/wp\/v2\/comments?post=75"}],"version-history":[{"count":1,"href":"https:\/\/varunpramanik.com\/chronicles\/wp-json\/wp\/v2\/posts\/75\/revisions"}],"predecessor-version":[{"id":79,"href":"https:\/\/varunpramanik.com\/chronicles\/wp-json\/wp\/v2\/posts\/75\/revisions\/79"}],"wp:attachment":[{"href":"https:\/\/varunpramanik.com\/chronicles\/wp-json\/wp\/v2\/media?parent=75"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/varunpramanik.com\/chronicles\/wp-json\/wp\/v2\/categories?post=75"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/varunpramanik.com\/chronicles\/wp-json\/wp\/v2\/tags?post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}