Re: [Excel Ramblings 2028] Desktop Liberation - Authentication fails

29 views
Skip to first unread message

Bruce Mcpherson

unread,
Feb 27, 2018, 12:39:03 PM2/27/18
to excel-r...@googlegroups.com
Hi

Some people have found troubles with older versions of IE and Windows - the oauth tries to grab the code from one of the objects in IE  that was suppressed at one particular version of IE.. which versions are you using?

regards
Bruce

On 27 February 2018 at 16:16, <malcolm....@johnlewis.co.uk> wrote:
Thank you so much for sharing your fine work.  I have downloaded sheetsApi.xlsm and have followed the instructions but come to an error when running Private Function sheetsOnceOff().  

Preparatory steps: - I created a new Google Sheets artifact.  I enabled the advanced Sheets 4.0 API and enabled same in the Google API console.  I generated Client ID and Client secret IDs.  Client ID is a 72 character string ending ".apps.googleusercontent.com".  Client secret is a 24 char string.

when I run sheetsOnceOff I am prompted to authenticate.  I select my account name and I am propted "[Project Name] wants to View and Manage your Spreadsheets in Google Drive"  When I click Allow I get an error message:

Run-time error '-2147012889 (80072ee7)'
The server name or address could not be resolved

This error is in response to call: "ohttp.send data"  in Public Function httpPost.

Data:  code=4/AABSiHbQ64JVhU9g6QWWgdUFkjkTnF28R9WVyTOXczqsimz1QjlgjVA&client_id=[MY VALID CLIENT ID]&client_secret=[MY VALID CLIENT SECRET]&redirect_uri=urn:ietf:wg:oauth:2.0:oob&grant_type=authorization_code

I set a breakpoint at the failed statement "ohttp.send data" and quized the ohttp object in the VBA immediate window - it seemed to have been created as a valid object, debug.print ohttp.readystate returned "1".

While I have a rich VBA background I am new to Google Apps Script, the sheets API and the http object.  I would welcome any debugging tips that will help me progress with authentication

Thanks in advance,

Malcolm

**********************************************************************
This email is confidential and may contain copyright material of the John Lewis Partnership.
If you are not the intended recipient, please notify us immediately and delete all copies of this message.
(Please note that it is your responsibility to scan this message for viruses). Email to and from the
John Lewis Partnership is automatically monitored for operational and lawful business reasons.
**********************************************************************

John Lewis plc
Registered in England 233462
Registered office 171 Victoria Street London SW1E 5NN

Websites: https://www.johnlewis.com
http://www.waitrose.com
https://www.johnlewisfinance.com
http://www.johnlewispartnership.co.uk

**********************************************************************

--
You received this message because you are subscribed to the Google Groups "Excel Liberation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to excel-ramblings+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Agustin Cordoba

unread,
Apr 13, 2018, 7:17:17 AM4/13/18
to Excel Liberation
Hi, i manage to make it run by changing the var that gets the response from string to variant. On Windows 7 and 10, excel 365. IE with latest update.
Reply all
Reply to author
Forward
0 new messages