How to generate an API Key for the Google Spreadsheet Widget

Comments

33 comments

  • Avatar
    Darius Aleksas
    Question. How exactly do I restrict/bind API key to a particular presentation or sheet?
    0
    Comment actions Permalink
  • Avatar
    Donna Peplinskie
    Google Developers Console enables you to restrict requests to particular HTTP referrers. You could try playing around with that to see if you can get such a granular level of control.
    0
    Comment actions Permalink
  • Avatar
    Derek Smith
    The steps outlined in this article diverge substantially after Step 4 because I'm forced to create a OAuth 2.0 Client ID instead of creating an API Key. After that, none of your examples make any sense.

    I work at a school fully tied to Google Apps for Education, and to be honest, I have no experience doing this API stuff.

    Why is it so complicated to change the refresh rate? The old Sheets widget or gadget would refresh whenever the sheet itself was altered. This process is so awkward!

    Any help would be appreciated. 
    0
    Comment actions Permalink
  • Avatar
    Darius Aleksas
    Derek, there is really nothing complicated about creating Google API keys. I made this easy, no-stress  9-11 step guide on how to do it: http://prodo.us/dsigns/APIkey.pdf
    0
    Comment actions Permalink
  • Avatar
    Derek Smith
    Unfortunately, because I'm tied into Apps for Education, I get a completely different Developers Console:



    Clicking on IAM in the sidebar above, leads me to 'Permissions', but with none of the options as shown on this page or Darius' help sheet:



    Why, oh why, can't the new Spreadsheet widget contain a Refresh interval like the older one? <sigh>
    0
    Comment actions Permalink
  • Avatar
    Darius Aleksas
    But you could create a new Google account just for that.
    0
    Comment actions Permalink
  • Avatar
    Robb Price
    Derek,

    I was going to suggest the exact same as Darius. I think a separate Google account would be your best bet here.

    Let us know how you make out!
    0
    Comment actions Permalink
  • Avatar
    Derek Smith
    I can't create a Google account in the Google Apps for Education schema. It also needs to be shared with other members of my school.
    0
    Comment actions Permalink
  • Avatar
    Robb Price
    Derek,

    Is it possible that creating API keys is restricted in your domain?
    0
    Comment actions Permalink
  • Avatar
    Derek Smith
    Quite possibly, which makes Rise's API requirement either too difficult or impossible to accomplish.

    Can you please just bring back the ability to set a duration in the widget itself? :-)
    0
    Comment actions Permalink
  • Avatar
    Robb Price
    Derek,

    My understand is that the default Refresh Interval being 60 minutes is a restriction from Google when using Google Sheets. To use a different Refresh Interval,  you need to provide your own API Key.
    0
    Comment actions Permalink
  • Avatar
    Robb Price
    Derek,

    I've brought this up to our Dev team to see if they can give you some guidance after step 4, and to confirm that our steps are accurate.

    The only reason you would need to create a faster refresh rate is if the rate that is included in the Widget itself is not sufficient. If that refresh rate is sufficient, you don't need to add the Spreadsheet API Key.
    0
    Comment actions Permalink
  • Avatar
    Derek Smith
    The default 60 minutes is too long for our Lunch menu (which uses a Sheet for end-user simplicity) which can have frequent changes during the day.
    0
    Comment actions Permalink
  • Avatar
    Robb Price
    Thanks for that confirmation Derek! I'll make sure these steps get updated.

    Thanks!
    0
    Comment actions Permalink
  • Avatar
    Robb Price
    Derek,

    Did you by any chance try Darius' steps above? Did they work for you? I am going to try them out myself later today and check to see if they work as expected.

    Thanks!
    0
    Comment actions Permalink
  • Avatar
    Robb Price
    Derek,

    I've updated the steps in this doc, can you check them and let me know if they work for you?

    Thanks!
    0
    Comment actions Permalink
  • Avatar
    Darius Aleksas
    Robb, did they work as expected or I missed something important?  Also, what really threw me of the tracks for the first few times was that did not wait before my projects were created. Projects were not there yet, and I was getting confused. But maybe it is just me.
    0
    Comment actions Permalink
  • Avatar
    Robb Price
    Darius,

    I actually didn't get a chance to test yours, as when I was going through it, I realized that they had greatly simplified the process into what I have updated the above to.

    Less steps means more time for other work :) lol

    Thanks!
    0
    Comment actions Permalink
  • Avatar
    Derek Smith
    I had my Google Admin create the API key for me and now it works.

    If I give this API key to other users for the Google Spreadsheet widgets they will use in their own presentations, will it work, or will they need their own API key?
    0
    Comment actions Permalink
  • Avatar
    Darius Aleksas
    Derek, it will work, but keep in mind that Google allow just that many requests sent by one API for free. I recommend creating new API for each project and be mindful about the refresh times.
    0
    Comment actions Permalink
  • Avatar
    Derek Smith
    Thanks for the heads up.

    We have two campuses with a Lunch menu that displays on three monitors for about 1.5 hours a day. We also display the Athletics schedule on two monitors for about 3 hours a day.

    I'm not worried about bumping up against the 40k API requests per day limit. :-)
    0
    Comment actions Permalink
  • Avatar
    Darius Aleksas
    40K ... I did not know the limit was that high ))). Anyway, I create different API keys for different project just to keep things organized.
    0
    Comment actions Permalink
  • Avatar
    Robb Price
    Glad to hear you got it created Derek!
    0
    Comment actions Permalink
  • Avatar
    Donna Peplinskie
    There seems to be a bit of confusion as to why a Google API key is needed to achieve a more frequent refresh interval than 60 minutes.

    In a nutshell, the reason for that is because, with the introduction of Google's Sheets API version 4 (which is what we use to get data out of Google Spreadsheets), they introduced a new API key requirement. Prior to version 4, there was no such requirement.

    And because each API key has a maximum limit on the amount of requests that can be made each day, we knew we couldn't use the same API key for all users, especially for those users who require a frequent refresh interval. We would quickly reach the rate limits that Google had set if we did that.

    Ultimately, that's how we arrived at the decision to set a minimum default refresh interval of 60 minutes, and to require the use of a custom API key for those users who needed a more frequent interval.

    Hope that helps to clear things up!
    0
    Comment actions Permalink
  • Avatar
    Holiday Inn & Suites Bellingham
    I'm having trouble getting the API to pull my Google Sheets data.  Does anyone know if I need to configure the API key to work with any specific domains?  When data is pulled from Google Sheets, is that pulled from my media player's IP address/location, or is it pulled by Risevision servers and then pushed to my media player?

    Maybe there's something else I'm missing in the API credentials setup?
    0
    Comment actions Permalink
  • Avatar
    Darius Aleksas
    Have you looked at this: http://prodo.us/dsigns/APIkey.pdf
    0
    Comment actions Permalink
  • Avatar
    Holiday Inn & Suites Bellingham
    That did the trick.  Thank you Darius!
    0
    Comment actions Permalink
  • Avatar
    Robb Price
    Thanks for that Darius!
    0
    Comment actions Permalink
  • Avatar
    Jeremy Klammer
    Question on timing/refresh rate - Is the minimum limit set to refresh rate of refresh: 1 (min) -- meaning a refresh of once every 60 seconds? I tried typing 0.5 but that halts the API from refreshing at all.

    I was hoping to get something to refresh on a ~20 sec interval.


    Thanks!
    Jeremy
    0
    Comment actions Permalink
  • Avatar
    Robb Price
    Jeremy, 

    It is not limited to every 1 minute, but to 40,000 request per day. 

    Take a look at the examples in the original post for some examples to determine what is best for you.  

    Thanks!
    0
    Comment actions Permalink

Please sign in to leave a comment.