New topic: Google OAuth2 Service Account
<http://forums.realsoftware.com/viewtopic.php?t=47404> Page 1 of 1 [ 4 posts ] Previous topic | Next topic Author Message willgonz Post subject: Google OAuth2 Service AccountPosted: Mon Mar 25, 2013 9:31 pm Joined: Thu May 13, 2010 7:27 pm Posts: 331 Using the example from https://developers.google.com/accounts/ ... iceAccount I am trying to do a Server to Server Application. My goal is to have my Application access data on my Google Drive account. Has anyone tried anything with this. I know this is using OAuth2 but this is completely different than the other examples floating around out there for twitter. Thanks. Top simulanics Post subject: Re: Google OAuth2 Service AccountPosted: Mon Mar 25, 2013 10:19 pm Joined: Sun Aug 12, 2007 10:10 am Posts: 1005 Location: Boiling Springs, SC willgonz wrote:Using the example from https://developers.google.com/accounts/ ... iceAccount I am trying to do a Server to Server Application. My goal is to have my Application access data on my Google Drive account. Has anyone tried anything with this. I know this is using OAuth2 but this is completely different than the other examples floating around out there for twitter. Thanks. There is a specific set of API's used to access your Google Drive. 1) First go here: https://code.google.com/apis/console and get an OAuth2 key. 2) Click "Services" and turn Google Drive API on. 3) Then reference here https://developers.google.com/drive/v2/reference/ The idea is quite similar to how I developed the Google Maps API classes for the community. Take a look at the source code and follow the same basic outline for developing your Google Drive API class. If you need assistance, I'll be glad to help. _________________ Matthew A. Combatti Real Studio 2012 r1.2 Visit Real Studio Developer's Spot! Systems I Use: Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8 Beta Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/ Windows Server 2011/CentOS 5.4 /ReactOS/SimOS ~All REAL Compatible~ Top willgonz Post subject: Re: Google OAuth2 Service AccountPosted: Mon Mar 25, 2013 10:31 pm Joined: Thu May 13, 2010 7:27 pm Posts: 331 I have done all of that. I have all the keys. I am stuck at https://developers.google.com/accounts/ ... gsignature I think I can use openssl to perform the RSA functions. So because the certificate comes as a p12 I converted it to a PEM with: openssl pkcs12 -in privatekey.p12 -out privatekey.pem Then I have been doing this to sign my data: openssl sha -sha256 -sign ~/privatekey.pem -passin pass:notasecret < ~/sha256hash.txt > ~/test2 I think where it fails might be how I am loading the Byte Array: dim x as Integer dim DataIn,u as string dim mb as new MemoryBlock(128) dim ReadFile as FolderItem ReadFile=new FolderItem(filename,FolderItem.PathTypeShell) If ReadFile <> Nil Then Dim ReadStream as BinaryStream =BinaryStream.Open(ReadFile) ReadStream.LittleEndian=false for x = 1 to ReadStream.Length-1 ReadStream.Position=x mb.Byte(x)= ReadStream.ReadByte next x ReadStream.close ReadStream= nil End If Return mb Top willgonz Post subject: Re: Google OAuth2 Service AccountPosted: Tue Mar 26, 2013 2:23 am Joined: Thu May 13, 2010 7:27 pm Posts: 331 Also I would like to point out that I am getting my UTC time from the unix shell. date +%s So I know that can't be the issue. I think it is something with either the openssl or my method for pulling the data from the dump file. If I can get this working this will mean, FULL Google Drive access for EVERYONE with Desktop apps and Web Apps. I might have to do a BASH version to rule out that it is a problem with RealBasic code. Thanks. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 4 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
