Visokio website     Downloads     Video tutorials     KnowledgeBase  
Connectors: Google logins "Invalid grant" error - Visokio Forums
Connectors: Google logins "Invalid grant" error
  •     chris July 29, 2014 9:18AM
    Several Omniscope users have reported an error when using one of the Google connectors in Omniscope. The error reported is:

    "error" : "invalid_grant"

    This error effects the following connectors:

    • Google Analytics
    • Google Drive
    • Google Spreadsheets
    • Google BigQuery
    • DoubleClick

    This error is generated by the Google server and not Omniscope.

    The following link outlines why this error occurs:

    As described in the link above, the cause of this error is either due to your server clock or the refresh limit being reached. In most cases it is because the refresh limit is being reached.

    The refresh limit is controlled by Google and is beyond our control. Here is a summary of how it works:

    Every time you enter your client ID/secret and click on the "connect" button in a Google block a refresh-token is generated behind the scenes. This refresh token is saved and used to download data from the Google server. Google have hard-coded a limit of 25 refresh tokens per client ID/secret. What this means is that if you have 26 Google blocks and you connect on each one in order, once you connect on the 26th block the first block's refresh token becomes invalid. If you attempt to refresh the data the "invalid grant" error will be shown.

    If you are using the same client ID/client token and are regularly creating and configuring Google blocks you are likely to run into this issue.

    We have spoken to Google about this issue and there is no way to change this limit or to get notification when a refresh token becomes invalid.

    We will be improving the error message shown when this error occurs. We will also investigate ways that we can get around this issue, perhaps by storing refresh tokens on the server.

    In the short term here are a few tips for getting around this issue:

    • If you regularly use the Google connectors, create several client ID's/secrets. Maybe create one client ID/secret for production and one for testing.
    • If you are using Google connectors in a production system, avoid using the client ID/secret elsewhere
    • Keep track of the client ID/secret that you are using and the associated Omniscope files.

    We apologise to all our users affected by issue, it appears that Google have recently introduced this restriction and we understand it has caused a great deal of frustration. We will endevour to create a better solution, but in the meantime if you have any further questions please get in touch.
  •        daniel July 29, 2014 9:53AM
    I'm using the DoubleClick connector and yesterday I was receiving timeouts when trying to update a connector after just three tries. If that is related to this then it doesn't seem to be that one Google block represents one request.

    Also the wording of the statement seems to imply that it would be account wide and not against each secret/token pair so even with different tokens and code, will it hit the same limit in the same amount of requests?
  •     chris July 29, 2014 10:03AM

    This is unlikely to be related or the same issue, it's possibly just a temporary problem with the Google server. The invalid-grant error is returned immediately. If you have a client ID/secret used only in one block then you should never see this problem.

    We have been informed by Google themselves that this is related to the application (client ID/secret) and not the account.


It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership