<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Permissions on tanaike - Google Apps Script, Gemini API, and Developer Tips</title>
    <link>https://tanaikech.github.io/tags/permissions/</link>
    <description>Recent content in Permissions on tanaike - Google Apps Script, Gemini API, and Developer Tips</description>
    <generator>Hugo</generator>
    <language>ja</language>
    <copyright>&amp;copy; 2026. All rights reserved.</copyright>
    <lastBuildDate>Fri, 10 Jul 2020 13:51:56 +0900</lastBuildDate>
    <atom:link href="https://tanaikech.github.io/tags/permissions/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Transfer of owner of files got to be able to be achieved with batch requests of Drive API</title>
      <link>https://tanaikech.github.io/2020/07/10/transfer-of-owner-of-files-got-to-be-able-to-be-achieved-with-batch-requests-of-drive-api/</link>
      <pubDate>Fri, 10 Jul 2020 13:51:56 +0900</pubDate>
      <guid>https://tanaikech.github.io/2020/07/10/transfer-of-owner-of-files-got-to-be-able-to-be-achieved-with-batch-requests-of-drive-api/</guid>
      <description>&lt;p&gt;At July 7, 2020, I have reported the transfer of owner of files got not to be able to be achieved with batch requests of Drive API. &lt;a href=&#34;https://tanaikech.github.io/2020/07/07/transfer-of-owner-of-files-got-not-to-be-able-to-be-used-with-batch-requests-of-drive-api/&#34;&gt;Ref&lt;/a&gt; But today, I could confirm that this got to be able to be achieved.&lt;/p&gt;&#xA;&lt;p&gt;But, I&amp;rsquo;m worry about the possibility that this might not be able to be used in the future again.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Transfer of owner of files got not to be able to be used with batch requests of Drive API</title>
      <link>https://tanaikech.github.io/2020/07/07/transfer-of-owner-of-files-got-not-to-be-able-to-be-used-with-batch-requests-of-drive-api/</link>
      <pubDate>Tue, 07 Jul 2020 13:31:49 +0900</pubDate>
      <guid>https://tanaikech.github.io/2020/07/07/transfer-of-owner-of-files-got-not-to-be-able-to-be-used-with-batch-requests-of-drive-api/</guid>
      <description>&lt;p&gt;At 15, June 2020, I have reported the transfer of owner of files got to be able to be achieved with batch requests of Drive API. &lt;a href=&#34;https://tanaikech.github.io/2020/06/15/transfer-of-owner-of-files-got-to-be-able-to-be-achieved-with-batch-requests-of-drive-api/&#34;&gt;Ref&lt;/a&gt; And also, yesterday (06, July 2020), I could have confirmed that this could be worked. But, now (07, July 2020), the following response is returned.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;error&amp;#34;&lt;/span&gt;: {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;errors&amp;#34;&lt;/span&gt;: [&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;domain&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;global&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;reason&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;invalidSharingRequest&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;message&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Bad Request. User message: \&amp;#34;You can&amp;#39;t yet change the owner of this item. (We&amp;#39;re working on it.)\&amp;#34;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ],&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;code&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;400&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;message&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Bad Request. User message: \&amp;#34;You can&amp;#39;t yet change the owner of this item. (We&amp;#39;re working on it.)\&amp;#34;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I hope this situation is resolved in the near future.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Transfer of owner of files got to be able to be achieved with batch requests of Drive API</title>
      <link>https://tanaikech.github.io/2020/06/15/transfer-of-owner-of-files-got-to-be-able-to-be-achieved-with-batch-requests-of-drive-api/</link>
      <pubDate>Mon, 15 Jun 2020 14:37:28 +0900</pubDate>
      <guid>https://tanaikech.github.io/2020/06/15/transfer-of-owner-of-files-got-to-be-able-to-be-achieved-with-batch-requests-of-drive-api/</guid>
      <description>&lt;p&gt;Today, I could confirm that the transfer of owner of files got to be able to be achieved with batch requests of Drive API. When I had tested this at January 31, 2020, an error of &lt;code&gt;there is no function to change the owner of this item yet (currently under development)&lt;/code&gt; had occurred.&lt;/p&gt;&#xA;&lt;p&gt;But today, I could confirm that this got to be able to be achieved by the batch requests. By this, the owner of a lot of files can be transferred by reducing both the process cost and the quota cost.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Uploading CSV File as Spreadsheet and Modifying Permissions using Golang</title>
      <link>https://tanaikech.github.io/2017/09/21/uploading-csv-file-as-spreadsheet-and-modifying-permissions-using-golang/</link>
      <pubDate>Thu, 21 Sep 2017 15:43:14 +0900</pubDate>
      <guid>https://tanaikech.github.io/2017/09/21/uploading-csv-file-as-spreadsheet-and-modifying-permissions-using-golang/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://gist.github.com/tanaikech/7ee103c80759a8297da198a5d1e92fc8&#34;&gt;Gists&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This sample script is for uploading CSV file as Spreadsheet and modifying permissions using Golang.&lt;/p&gt;&#xA;&lt;p&gt;I think that the detail information of &lt;strong&gt;google-api-go-client&lt;/strong&gt; is a bit little. The sample scripts are so little. It retrieves most information from only &lt;a href=&#34;https://godoc.org/google.golang.org/api/drive/v3&#34;&gt;godoc&lt;/a&gt; and &lt;a href=&#34;https://github.com/google/google-api-go-client/tree/master/drive&#34;&gt;GitHub&lt;/a&gt;. So I publish such sample scripts here. If this is useful for you, I&amp;rsquo;m glad.&lt;/p&gt;&#xA;&lt;h2 id=&#34;important-points-&#34;&gt;Important points :&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Give mimeType of file that it wants to upload to &lt;code&gt;options&lt;/code&gt; of &lt;code&gt;Media(r io.Reader, options ...googleapi.MediaOption)&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;In order to give &lt;code&gt;options&lt;/code&gt;, use &lt;code&gt;googleapi.ContentType()&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Give mimeType of file that it wants to convert, when it uploads it to Google Drive, to &lt;code&gt;file&lt;/code&gt; of &lt;code&gt;Create(file *File)&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;In order to give &lt;code&gt;file&lt;/code&gt;, use &lt;code&gt;&amp;amp;drive.File{}&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;For installing permissions, use &lt;code&gt;&amp;amp;drive.Permission{}&lt;/code&gt;. Each parameter is the same to them for Python.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;strong&gt;This sample script uses &lt;a href=&#34;https://developers.google.com/drive/v3/web/quickstart/go&#34;&gt;Quickstart&lt;/a&gt;. So in order to use this sample script, at first, please do Step 1 and Step 2 of the Quickstart.&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
