GoogleKit

API • Updated 5 years ago

Download Shortcut Add to Collection
Version 1.2 • 47433 unique downloads

ShareShortcuts Member:

@tdevx



GoogleKit was designed to simplify the way your Shortcuts connect to the Google API.

Powered by Google

Graphics by MediaKit

UpdateKit


Note: Instructions on how to configure this Shortcut are below. If you experience issues or require any assistance, don’t hesitate to contact me via Reddit.

Message


Screenshots

YouTube Manager


Overview

This shortcut was designed to remove some of the bloat from Shortcuts that utilise the Google API (as well as remove some of the headache). When you implement GoogleKit, you’ll be able to remove over 200 Actions (per Shortcut) and still ensure you’re receiving an active Access Token.

GoogleKit (once setup), will allow access to all of the Google API calls as well are check the Access Token each time your Shortcut is run to make sure it’s still active. If it’s no longer active, it will automatically refresh with the API to make sure everything runs smoothly.

Thanks to GoogleKit, implementing the Google API won’t be as tedious as before. If we wanted to publish a Shortcut that used Google’s API, I found the daily quota to be very low and easily hit. Now thanks to this Shortcut, every user will have their on indicidual quota! This means if one person hits the quota, the service won’t be down for everybody.


Documentation

Setup Instructions

Tip: Follow each step to the letter, this is to minimise the risk of you encountering any issues.

  1. Visit THIS link to the Google Developer Console.

  2. Create a new project and call it ”Shortcuts”.

  3. Visit THIS link to the Google API Credentials page.

  4. Type “Shortcuts” in ”Application Name” and save it.

  5. Visit THIS link to the Google oAuth page.

  6. Select “Web Application” and type “http://localhost/“ (lowercase) into the ”Authorised Redirect URI” box, then create the application.

  7. Download and run the ”GoogleKit”Shortcut, you will be guided through the rest of the setup from there.

  8. Done.

Tip: Follow the instructions below each time you install a GoogleKit compatible Shortcut.

  1. Install a GoogleKit compatible Shortcut such as ”YouTube Manager”.

  2. Run the new Shortcut once before running ”GoogleKit”.

  3. Head into ”Settings” and tap on ”Add API”.

  4. Tap on the new Shortcut and Enable all of the listed API’s.

  5. Head into ”Settings” and tap on ”Grant Scope”.

  6. Tap on the new Shortcut and Enable all of the listed Scopes.

  7. Done.

Implementation

Implementation of GoogleKit couldn’t be easier, all it requires from you is around 7 Actions in total placed near the top of your Shortcut. After you add them, you are good to go.

I do however, highly recommend that you inform people when they run your Shortcut to check GoogleKit for your required Scopes / API’s.

Access Token

GoogleKit can fetch the latest Access Token for you, all this takes is placing 3 Actions near the top of your Shortcut.

  1. Place the Text Action and type “refresh_token” inside.
  2. Place the Run Shortcut Action and select the “GoogleKit” Shortcut.
  3. Place the Set Variable Action and name it “access_token”

Token

Required API

If you need to set a list of required API’s for your Shortcut, all you need to do is add 2 Actions after Access Token.

  1. Place the Dictionary Action, add the API name in ”Key” and the API URL in ”Value”.
  2. Place the Save File Action and set the destination path as “GoogleKit/API/SHORTCUT NAME.json”, and enable ”Overwrite If File Exists”.

API

Required Scopes

If you’re using an API that requires sensitive data, the user will need to grant access to the Scopes you’re using. If you need to set a list of required Scopes for your Shortcut, all you need to do is add 2 more Actions after Access Token.

  1. Place the Dictionary Action, add the Scope name in ”Key” and the Scope URL in ”Value”.
  2. Place the Save File Action and set the destination path as “GoogleKit/Scopes/SHORTCUT NAME.json”, and enable ”Overwrite If File Exists”.

Scope



Changelog

v1.2
  • Version 1.2   Current
    5 years ago (Changes)
  • Version 1.1
    5 years ago (Changes)
  • Version 1.0
    5 years ago (Changes)

Extensions:

Siri is supported

ShareSheet is supported

Widget is supported

Show 15 embedded comment(s) in this Shortcut
Show External URL-calls / Webservices / Workflow URL schemes