{"id":5174,"date":"2021-07-01T22:52:51","date_gmt":"2021-07-01T22:52:51","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=5174"},"modified":"2021-07-20T06:48:40","modified_gmt":"2021-07-20T06:48:40","slug":"google-drive-api-credential-json-and-token-json-access-token","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token","title":{"rendered":"Google Drive API \\ Credential.json and token.json ( Access Token )"},"content":{"rendered":"<p>Recently had to reverse engineer a Google Drive PHP API Script, and I thought I would document the process!<\/p><p>Before you go down the below path , you will need to make sure you can push your project <a href=\"https:\/\/support.google.com\/cloud\/answer\/10311615#publishing-status&amp;zippy=%2Ctesting%2Cinternal%2Cexternal\">In Production <\/a>(Very Long winded )<\/p><p>Testing mode for your project (even in Offline mode ) the below Refresh and Access Tokens with Expire every 7 days , if not use <a href=\"https:\/\/pariswells.com\/blog\/research\/how-to-use-a-service-account-to-access-google-drive-api-instead-of\">service account<\/a><\/p><p><strong>Credentials.JSON<\/strong><\/p><p>Format of this file is like below<\/p><pre>{\"web\":{\"client_id\":\"xxxxxxxxxxxx\",\"project_id\":\"xxxxxxxxxxx\",\"auth_uri\":\"https:\/\/accounts.google.com\/o\/oauth2\/auth\",\"token_uri\":\"https:\/\/oauth2.googleapis.com\/token\",\"auth_provider_x509_cert_url\":\"https:\/\/www.googleapis.com\/oauth2\/v1\/certs\",\"client_secret\":\"xxxxxxxxxxxxxxxx\",\"redirect_uris\":[\"xxxxxxxxxxxxxx\",\"xxxxxxxxxx\"]}}<\/pre><p><span style=\"text-decoration: underline;\"><strong>How do get this\u00a0<\/strong><\/span><\/p><ol><li>Create a new google account for Google drive and enable that account for API access ( https:\/\/developers.google.com\/drive\/api\/v3\/enable-drive-api )<\/li><li>Create OAuth client ID and Select Web Application , add the authorize URLs and create\u00a0<\/li><li>Download Crdential.json of the client your just created<p id=\"XKKIQLJ\"><img loading=\"lazy\" decoding=\"async\" width=\"1479\" height=\"56\" class=\"alignnone size-full wp-image-5178  img-responsive\" src=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de41a89cb73.png\" alt=\"\" srcset=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de41a89cb73.png 1479w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de41a89cb73-300x11.png 300w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de41a89cb73-1024x39.png 1024w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de41a89cb73-768x29.png 768w\" sizes=\"auto, (max-width: 1479px) 100vw, 1479px\" \/><\/p><\/li><\/ol><p>&nbsp;<\/p><p><strong>Token.JSON<\/strong><\/p><p>This is what they can your Access Token , Format of this file is like below<\/p><pre>{\"access_token\":\"xxxxxxxxxxxxxxxxxx\",\"expires_in\":3599,\"scope\":\"https:\\\/\\\/www.googleapis.com\\\/auth\\\/drive.metadata.readonly\",\"token_type\":\"Bearer\",\"created\":1625147606,\"refresh_token\":\"xxxxxxxxxxxxxxxxxxxxxx\"}<\/pre><p>The script used the existing code here <a href=\"https:\/\/developers.google.com\/docs\/api\/quickstart\/php\">https:\/\/developers.google.com\/docs\/api\/quickstart\/php<\/a><\/p><p>You can see that the script is supposed to retrieve the token.json file when you give it the crdential file, however when I ran this I got\u00a0<\/p><p class=\"lang-php s-code-block\"><code class=\"hljs language-php\">Notice: <span class=\"hljs-keyword\">Use<\/span> <span class=\"hljs-title\">of<\/span> <span class=\"hljs-title\">undefined<\/span> <span class=\"hljs-title\">constant<\/span> <span class=\"hljs-title\">STDIN<\/span> - <span class=\"hljs-title\">assumed<\/span> '<span class=\"hljs-title\">STDIN<\/span>'<\/code><\/p><p class=\"lang-php s-code-block\"><b>Warning<\/b>: Use of undefined constant STDIN &#8211; assumed &#8216;STDIN&#8217; (this will throw an Error in a future version of PHP) in\u00a0<br \/><br \/><b>Warning<\/b>: fgets() expects parameter 1 to be resource, string given in\u00a0on line\u00a0<b>3<\/b><br \/><br \/>Further research shows &#8220;only the\u00a0<strong>CLI<\/strong>\u00a0(command line) SAPI defines\u00a0<a href=\"https:\/\/www.php.net\/manual\/en\/features.commandline.io-streams.php\" rel=\"nofollow noreferrer\">I\/O constants<\/a>\u00a0such as\u00a0<code>STDIN<\/code>,\u00a0<code>STDOUT<\/code>, and\u00a0<code>STDERR<\/code><\/p><p>I didn&#8217;t have access to PHP Cli Easily , so I performed the below ( <a href=\"https:\/\/gist.github.com\/LindaLawton\/cff75182aac5fa42930a09f58b63a309\">this was a big help but it pulled an Application Access Token instead of Web<\/a> )\u00a0<\/p><p>To get this you have to post stuff to google api and get a file<\/p><ol><li>Open Up your Credential.json file and get your Client_id and Client Secret<\/li><li>Change the below to have your Client ID and correct redirect_uri and <a href=\"https:\/\/developers.google.com\/drive\/api\/v3\/about-auth\">scope\u00a0<\/a><br \/>https:\/\/accounts.google.com\/o\/oauth2\/auth?client_id=XXXXXXXXXXX&amp;redirect_uri=XXXXXXXXX&amp;scope=https:\/\/www.googleapis.com\/auth\/drive.metadata.readonly&amp;response_type=code&amp;access_type=offline&amp;prompt=consent<\/li><li>Post this into a browser that&#8217;s logged into the google account where you API is registered Go through the prompts to allow access , after this is done it will take you back to your redirect_uri and give you an Authorisation code per below<\/li><li><img loading=\"lazy\" decoding=\"async\" width=\"1147\" height=\"49\" class=\"alignnone size-full wp-image-5176  img-responsive\" src=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de4009669e4.png\" alt=\"\" srcset=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de4009669e4.png 1147w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de4009669e4-300x13.png 300w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de4009669e4-1024x44.png 1024w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de4009669e4-768x33.png 768w\" sizes=\"auto, (max-width: 1147px) 100vw, 1147px\" \/><br \/>Format\u00a0https:\/\/redirect_uri\/?code=[Authorisaton Code]&amp;scope=[SCOPE] ( Copy and save the Authorisation Code )\u00a0<\/li><li>Next you will need a Linux machine with Curl , <a href=\"https:\/\/www.kali.org\/docs\/wsl\/win-kex\/\">you can install Linux on Windows using WSL<\/a><\/li><li>Open up the Linux terminal and paste the below<br \/><br \/>curl \\<\/li><\/ol><p style=\"padding-left: 40px;\">&#8211;request POST \\<br \/>&#8211;data &#8220;code=[Authorisaton Code]&amp;client_id=[CLIENT ID]&amp;client_secret=]CLIENT SECRET]&amp;redirect_uri=[REDIRECT URI]&amp;grant_type=authorization_code&#8221; \\<br \/>https:\/\/accounts.google.com\/o\/oauth2\/token<\/p><p id=\"jUlhPCe\"><img loading=\"lazy\" decoding=\"async\" width=\"1564\" height=\"351\" class=\"alignnone size-full wp-image-5175  img-responsive\" src=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de3ee59f95e.png\" alt=\"\" srcset=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de3ee59f95e.png 1564w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de3ee59f95e-300x67.png 300w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de3ee59f95e-1024x230.png 1024w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de3ee59f95e-768x172.png 768w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de3ee59f95e-1536x345.png 1536w\" sizes=\"auto, (max-width: 1564px) 100vw, 1564px\" \/><\/p><p>It will come back with an access_token and refresh_token<\/p><p>create a Json file with this in per below\u00a0<\/p><p>{&#8220;access_token&#8221;:&#8221;xxxxxxxxxxxxxxxxxx&#8221;,&#8221;expires_in&#8221;:3599,&#8221;scope&#8221;:&#8221;https:\\\/\\\/www.googleapis.com\\\/auth\\\/drive.metadata.readonly&#8221;,&#8221;token_type&#8221;:&#8221;Bearer&#8221;,&#8221;created&#8221;:1625147606,&#8221;refresh_token&#8221;:&#8221;xxxxxxxxxxxxxxxxxxxxxx&#8221;}<\/p><p><a href=\"https:\/\/developers.google.com\/drive\/api\/v3\/reference\/permissions\/create?apix_params=%7B%22fileId%22%3A%221Y0O4m_lLdf0iJY4esbsq_LEZnc-hujFM%22%2C%22resource%22%3A%7B%22role%22%3A%22reader%22%2C%22type%22%3A%22user%22%7D%7D\">How to Create Permissions so files are public<\/a><\/p><p>Folder or File ID in fileId<\/p><p>Request Body<\/p><p>{<br \/>&#8220;role&#8221;: &#8220;reader&#8221;,<br \/>&#8220;type&#8221;: &#8220;user&#8221;<br \/>}<\/p>","protected":false},"excerpt":{"rendered":"<p>Recently had to reverse engineer a Google Drive PHP API Script, and I thought I would document the process!Before you go down the below path , you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3518,3515,1590,3520,3519,3516,3523,698,3521,3517,3522],"class_list":["post-5174","post","type-post","status-publish","format-standard","hentry","category-research","tag-access-token","tag-access_token","tag-api","tag-credentials-json","tag-curl","tag-google-drive","tag-google-drive-api-access-token-without-cli","tag-php","tag-stdin","tag-token-json","tag-use-of-undefined-constant-stdin"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"Recently had to reverse engineer a Google Drive PHP API Script, and I thought I would document the process!Before you go down the below path , you will need to make sure you can push your project In Production (Very Long winded )Testing mode for your project (even in Offline mode ) the below Refresh\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"paris\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Welcome to Pariswells.com |\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Google Drive API \\ Credential.json and token.json ( Access Token ) | Welcome to Pariswells.com\" \/>\n\t\t<meta property=\"og:description\" content=\"Recently had to reverse engineer a Google Drive PHP API Script, and I thought I would document the process!Before you go down the below path , you will need to make sure you can push your project In Production (Very Long winded )Testing mode for your project (even in Offline mode ) the below Refresh\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2021-07-01T22:52:51+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2021-07-20T06:48:40+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Google Drive API \\ Credential.json and token.json ( Access Token ) | Welcome to Pariswells.com\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Recently had to reverse engineer a Google Drive PHP API Script, and I thought I would document the process!Before you go down the below path , you will need to make sure you can push your project In Production (Very Long winded )Testing mode for your project (even in Offline mode ) the below Refresh\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/research\\\/google-drive-api-credential-json-and-token-json-access-token#article\",\"name\":\"Google Drive API \\\\ Credential.json and token.json ( Access Token ) | Welcome to Pariswells.com\",\"headline\":\"Google Drive API \\\\ Credential.json and token.json ( Access Token )\",\"author\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/author\\\/paris#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/img_60de41a89cb73.png\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/research\\\/google-drive-api-credential-json-and-token-json-access-token\\\/#articleImage\",\"width\":1479,\"height\":56},\"datePublished\":\"2021-07-01T22:52:51+00:00\",\"dateModified\":\"2021-07-20T06:48:40+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/research\\\/google-drive-api-credential-json-and-token-json-access-token#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/research\\\/google-drive-api-credential-json-and-token-json-access-token#webpage\"},\"articleSection\":\"Research, access token, access_token, api, credentials.json, curl, Google Drive, google drive api access token without cli, PHP, STDIN, token.json, Use of undefined constant STDIN\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/research\\\/google-drive-api-credential-json-and-token-json-access-token#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pariswells.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/category\\\/research#listItem\",\"name\":\"Research\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/category\\\/research#listItem\",\"position\":2,\"name\":\"Research\",\"item\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/category\\\/research\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/research\\\/google-drive-api-credential-json-and-token-json-access-token#listItem\",\"name\":\"Google Drive API \\\\ Credential.json and token.json ( Access Token )\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/research\\\/google-drive-api-credential-json-and-token-json-access-token#listItem\",\"position\":3,\"name\":\"Google Drive API \\\\ Credential.json and token.json ( Access Token )\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/category\\\/research#listItem\",\"name\":\"Research\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/#organization\",\"name\":\"Welcome to Pariswells.com\",\"url\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/author\\\/paris#author\",\"url\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/author\\\/paris\",\"name\":\"paris\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/research\\\/google-drive-api-credential-json-and-token-json-access-token#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/93b8ee3f592ac401167f870452bd82d43de80152cd3524e2853403658ada9984?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"paris\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/research\\\/google-drive-api-credential-json-and-token-json-access-token#webpage\",\"url\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/research\\\/google-drive-api-credential-json-and-token-json-access-token\",\"name\":\"Google Drive API \\\\ Credential.json and token.json ( Access Token ) | Welcome to Pariswells.com\",\"description\":\"Recently had to reverse engineer a Google Drive PHP API Script, and I thought I would document the process!Before you go down the below path , you will need to make sure you can push your project In Production (Very Long winded )Testing mode for your project (even in Offline mode ) the below Refresh\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/research\\\/google-drive-api-credential-json-and-token-json-access-token#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/author\\\/paris#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/author\\\/paris#author\"},\"datePublished\":\"2021-07-01T22:52:51+00:00\",\"dateModified\":\"2021-07-20T06:48:40+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/\",\"name\":\"Welcome to Pariswells.com\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Google Drive API \\ Credential.json and token.json ( Access Token ) | Welcome to Pariswells.com","description":"Recently had to reverse engineer a Google Drive PHP API Script, and I thought I would document the process!Before you go down the below path , you will need to make sure you can push your project In Production (Very Long winded )Testing mode for your project (even in Offline mode ) the below Refresh","canonical_url":"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token#article","name":"Google Drive API \\ Credential.json and token.json ( Access Token ) | Welcome to Pariswells.com","headline":"Google Drive API \\ Credential.json and token.json ( Access Token )","author":{"@id":"https:\/\/pariswells.com\/blog\/author\/paris#author"},"publisher":{"@id":"https:\/\/pariswells.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2021\/07\/img_60de41a89cb73.png","@id":"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token\/#articleImage","width":1479,"height":56},"datePublished":"2021-07-01T22:52:51+00:00","dateModified":"2021-07-20T06:48:40+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token#webpage"},"isPartOf":{"@id":"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token#webpage"},"articleSection":"Research, access token, access_token, api, credentials.json, curl, Google Drive, google drive api access token without cli, PHP, STDIN, token.json, Use of undefined constant STDIN"},{"@type":"BreadcrumbList","@id":"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/pariswells.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog\/category\/research#listItem","name":"Research"}},{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog\/category\/research#listItem","position":2,"name":"Research","item":"https:\/\/pariswells.com\/blog\/category\/research","nextItem":{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token#listItem","name":"Google Drive API \\ Credential.json and token.json ( Access Token )"},"previousItem":{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token#listItem","position":3,"name":"Google Drive API \\ Credential.json and token.json ( Access Token )","previousItem":{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog\/category\/research#listItem","name":"Research"}}]},{"@type":"Organization","@id":"https:\/\/pariswells.com\/blog\/#organization","name":"Welcome to Pariswells.com","url":"https:\/\/pariswells.com\/blog\/"},{"@type":"Person","@id":"https:\/\/pariswells.com\/blog\/author\/paris#author","url":"https:\/\/pariswells.com\/blog\/author\/paris","name":"paris","image":{"@type":"ImageObject","@id":"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/93b8ee3f592ac401167f870452bd82d43de80152cd3524e2853403658ada9984?s=96&d=mm&r=g","width":96,"height":96,"caption":"paris"}},{"@type":"WebPage","@id":"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token#webpage","url":"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token","name":"Google Drive API \\ Credential.json and token.json ( Access Token ) | Welcome to Pariswells.com","description":"Recently had to reverse engineer a Google Drive PHP API Script, and I thought I would document the process!Before you go down the below path , you will need to make sure you can push your project In Production (Very Long winded )Testing mode for your project (even in Offline mode ) the below Refresh","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/pariswells.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token#breadcrumblist"},"author":{"@id":"https:\/\/pariswells.com\/blog\/author\/paris#author"},"creator":{"@id":"https:\/\/pariswells.com\/blog\/author\/paris#author"},"datePublished":"2021-07-01T22:52:51+00:00","dateModified":"2021-07-20T06:48:40+00:00"},{"@type":"WebSite","@id":"https:\/\/pariswells.com\/blog\/#website","url":"https:\/\/pariswells.com\/blog\/","name":"Welcome to Pariswells.com","inLanguage":"en-US","publisher":{"@id":"https:\/\/pariswells.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Welcome to Pariswells.com |","og:type":"article","og:title":"Google Drive API \\ Credential.json and token.json ( Access Token ) | Welcome to Pariswells.com","og:description":"Recently had to reverse engineer a Google Drive PHP API Script, and I thought I would document the process!Before you go down the below path , you will need to make sure you can push your project In Production (Very Long winded )Testing mode for your project (even in Offline mode ) the below Refresh","og:url":"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token","article:published_time":"2021-07-01T22:52:51+00:00","article:modified_time":"2021-07-20T06:48:40+00:00","twitter:card":"summary","twitter:title":"Google Drive API \\ Credential.json and token.json ( Access Token ) | Welcome to Pariswells.com","twitter:description":"Recently had to reverse engineer a Google Drive PHP API Script, and I thought I would document the process!Before you go down the below path , you will need to make sure you can push your project In Production (Very Long winded )Testing mode for your project (even in Offline mode ) the below Refresh"},"aioseo_meta_data":{"post_id":"5174","title":null,"description":null,"keywords":[],"keyphrases":{"focus":[],"additional":[]},"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":{"locations":{"business":{"name":"","businessType":"","image":"","areaServed":"","urls":{"website":"","aboutPage":"","contactPage":""},"address":{"streetLine1":"","streetLine2":"","zipCode":"","city":"","state":"","country":"","addressFormat":"#streetLineOne\n#streetLineTwo\n#city, #state #zipCode"},"contact":{"email":"","phone":"","phoneFormatted":"","fax":"","faxFormatted":""},"ids":{"vat":"","tax":"","chamberOfCommerce":""},"payment":{"priceRange":"","currenciesAccepted":"","methods":""}}},"openingHours":{"useDefaults":true,"show":true,"alwaysOpen":false,"use24hFormat":false,"timezone":"","labels":{"closed":"","alwaysOpen":""},"days":{"monday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"tuesday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"wednesday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"thursday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"friday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"saturday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"sunday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"}}}},"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-07-01 22:12:24","updated":"2022-09-16 13:40:58","primary_term":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/pariswells.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/pariswells.com\/blog\/category\/research\" title=\"Research\">Research<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tGoogle Drive API \\ Credential.json and token.json ( Access Token )\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/pariswells.com\/blog"},{"label":"Research","link":"https:\/\/pariswells.com\/blog\/category\/research"},{"label":"Google Drive API \\ Credential.json and token.json ( Access Token )","link":"https:\/\/pariswells.com\/blog\/research\/google-drive-api-credential-json-and-token-json-access-token"}],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=5174"}],"version-history":[{"count":7,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5174\/revisions"}],"predecessor-version":[{"id":5227,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5174\/revisions\/5227"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=5174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=5174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=5174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}