<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Access Token on tanaike - Google Apps Script, Gemini API, and Developer Tips</title>
    <link>https://tanaikech.github.io/tags/access-token/</link>
    <description>Recent content in Access Token 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, 04 Aug 2017 14:21:56 +0900</lastBuildDate>
    <atom:link href="https://tanaikech.github.io/tags/access-token/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Retrieving Access Token From OneDrive using Google Apps Script</title>
      <link>https://tanaikech.github.io/2017/08/04/retrieving-access-token-from-onedrive-using-google-apps-script/</link>
      <pubDate>Fri, 04 Aug 2017 14:21:56 +0900</pubDate>
      <guid>https://tanaikech.github.io/2017/08/04/retrieving-access-token-from-onedrive-using-google-apps-script/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://gist.github.com/tanaikech/d9674f0ead7e3320c5e3184f5d1b05cc&#34;&gt;Gist&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;This GAS sample is for retrieving access token to use OneDrive APIs using Google Apps Script.&lt;/p&gt;&#xA;&lt;p&gt;In this script, the authorization code is automatically retrieved.&lt;/p&gt;&#xA;&lt;h2 id=&#34;demo&#34;&gt;Demo&lt;/h2&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://tanaikech.github.io/img/20170804a_demo.gif&#34;&#xA;     alt=&#34;Retrieving Access Token From OneDrive using Google Apps Script&#34;&#xA;     &#xA;     loading=&#34;lazy&#34;&#xA;     decoding=&#34;async&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;&#xA;&lt;p&gt;In order to use this, both accounts of Google and OneDrive (MSN) are required.&lt;/p&gt;&#xA;&lt;h3 id=&#34;google-side&#34;&gt;Google side&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Copy and paste the sample script to your script editor. You can use the standalone script for this.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://developers.google.com/apps-script/guides/web&#34;&gt;Deploy Web Apps&lt;/a&gt;.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;On the Script Editor&#xA;&lt;ul&gt;&#xA;&lt;li&gt;File&lt;/li&gt;&#xA;&lt;li&gt;-&amp;gt; Manage Versions&lt;/li&gt;&#xA;&lt;li&gt;-&amp;gt; Save New Version&lt;/li&gt;&#xA;&lt;li&gt;Publish&lt;/li&gt;&#xA;&lt;li&gt;-&amp;gt; Deploy as Web App&lt;/li&gt;&#xA;&lt;li&gt;-&amp;gt; At Execute the app as, select &lt;strong&gt;&amp;ldquo;your account&amp;rdquo;&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;-&amp;gt; At Who has access to the app, select &lt;strong&gt;&amp;ldquo;Only myself&amp;rdquo;&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;-&amp;gt; Click &amp;ldquo;Deploy&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;-&amp;gt; Copy URL of &lt;strong&gt;&amp;ldquo;latest code&amp;rdquo;&lt;/strong&gt; (This is important!)&lt;/li&gt;&#xA;&lt;li&gt;-&amp;gt; Click &amp;ldquo;OK&amp;rdquo;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;URL of &lt;strong&gt;&amp;ldquo;latest code&amp;rdquo;&lt;/strong&gt; is &lt;code&gt;https://script.google.com/macros/s/###/dev&lt;/code&gt;. So please modify this URL. Replace from &amp;ldquo;dev&amp;rdquo; to &amp;ldquo;usercallback&amp;rdquo; for the URL. And copy this modified URL.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;From : &lt;code&gt;https://script.google.com/macros/s/###/dev&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;To : &lt;code&gt;https://script.google.com/macros/s/###/usercallback&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;onedrive-side&#34;&gt;OneDrive side&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Log in to &lt;a href=&#34;https://portal.azure.com/&#34;&gt;Microsoft Azure portal&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Search &amp;ldquo;Azure Active Directory&amp;rdquo; at the top of text input box. And open &amp;ldquo;Azure Active Directory&amp;rdquo;.&lt;/li&gt;&#xA;&lt;li&gt;Click &amp;ldquo;App registrations&amp;rdquo; at the left side bar.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In my environment, when I used Chrome as the browser, no response occurred. So in that case, I used Microsoft Edge.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Click &amp;ldquo;New registration&amp;rdquo;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;app name: &amp;ldquo;sample app name&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;Supported account types: &amp;ldquo;Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;Redirect URI (optional): Web&#xA;&lt;ul&gt;&#xA;&lt;li&gt;URL: &lt;code&gt;https://script.google.com/macros/s/###/usercallback&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Click &amp;ldquo;Register&amp;rdquo;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Copy &lt;strong&gt;&amp;ldquo;Application (client) ID&amp;rdquo;&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Click &amp;ldquo;Certificates &amp;amp; secrets&amp;rdquo; at the left side bar.&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Click &amp;ldquo;New client secrets&amp;rdquo;.&lt;/li&gt;&#xA;&lt;li&gt;After input the description and select &amp;ldquo;expire&amp;rdquo;, click &amp;ldquo;Add&amp;rdquo; button.&lt;/li&gt;&#xA;&lt;li&gt;Copy &lt;strong&gt;the created secret value&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;By above operation, the preparation is done.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
