sukendn

Please help on how to send Google Drive API

5 posts in this topic

I'm trying to send IP WAN on Google SpreadSheets   https://docs.google.com/spreadsheets/d/1OBhzEhjER6CbHp_rC3ohA59AJFJDOYnZEGEKOyen5UA/edit.

I have created ClientID and ClientSecret to use Google Spreadsheets API : https://console.developers.google.com

This is the code get WAN IP

#include <_HttpRequest.au3>


$_client_id = ''
$_client_secret = ''
_SetCell_SheetGoogle(3, 2, 123456, '1OBhzEhjER6CbHp_rC3ohA59AJFJDOYnZEGEKOyen5UA', $_client_id, $_client_secret)


Func _SetCell_SheetGoogle($Row, $Column, $Value, $SheetID = '', $Client_ID = '', $Client_Secret = '')
    If Not $Client_ID Or Not $Client_Secret Then Return SetError(1, 1, MsgBox(4096, '', 'Not Found ID'))
    Local $URL = 'https://docs.google.com/spreadsheets/d/' & $SheetID & '/save?id=' & $SheetID & '&sid=' & $Client_Secret & '&c=1&w=1'
    Local $boundary = _WinHttpBoundaryGenerator()
    Local $xd = @CRLF & @CRLF
    Local $data2send = $boundary & @CRLF & _
            'Content-Disposition: form-data; name="rev"' & $xd & '' & @CRLF & _
            $boundary & @CRLF & _
            'Content-Disposition: form-data; name="bundles"' & $xd & '[{"commands":[[21299578,{"1":{"1":"1859518452","2":' & $Row & ',"3":' & ($Row + 1) & ',"4":' & $Column & ',"5":' & ($Column + 1) & '},"2":{"1":6445244,"2":3,"3":{"1":3,"3":' & $Value & '},"6":0},"3":{"2":[{"2":513,"3":{"1":0},"12":0}]}}]],"sid":"' & $Client_Secret & '","reqId":0}]' & @CRLF & _
            $boundary & @CRLF & _
            'Content-Disposition: form-data; name="selection"' & $xd & '[30710966,[null,[null,[null,"1859518452",' & $Row & ',' & $Column & '],[[null,"1859518452",' & $Row & ',' & ($Row + 1) & ',' & $Column & ',' & ($Column + 1) & ']],null,null,0]]]' & @CRLF & _
            $boundary & '--'
    Local $cookie1 = _GetCookie(_HttpRequest(1, $URL))
    Local $cookie2 = _GetCookie(_HttpRequest(1, $URL, '', $cookie1))
    _HttpRequest(1, $URL, $data2send, $cookie1 & $cookie2, 'https://docs.google.com/spreadsheets/d/' & $SheetID & '/edit', 'client_id: ' & $Client_ID, 'PUT', True, $boundary)
EndFunc

Hope you help me. Thanks.

_HttpRequest.au3

WinHttp.au3

WinHttpConstants.au3

ZLIB.au3

Share this post


Link to post
Share on other sites



Plz hepl me !!

Share this post


Link to post
Share on other sites

@sukendn please explain how this is any different from the thread below, which you were specifically told you would receive no help on.

 

 

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I guess that is a certain misunderstanding, hope you reconsider this issue help me. I just wanted to statistics users of my stuff. If you have any other way, you can help me ?
Thank you

Edited by sukendn

Share this post


Link to post
Share on other sites

@sukendn, as you failed to answer my question, this thread will also be closed. Don't post this question a third time.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.