Email Migration API - getting started questions

52 views
Skip to first unread message

Jeffrey McKay

unread,
Mar 1, 2012, 8:25:52 PM3/1/12
to google-app...@googlegroups.com
First - Am I able to use this API using OAuth 2.0?   My application uses OAuth 2.0 to connect with Calendar, Contacts and Tasks, so I have the basic thing working.  When I tried with Email API, putting the access_token in the URL as usual, I get error 401 - authorization required.
 
Trying to solve this, I used the alternate method of passing the access token, i.e.  "Authorization: Bearer ..." in a http header.  Now, I am getting http error 500 - server error, in response to my post.  I am wondering if I am in fact past the authorization issue, or it doesn't like the header?  If I am past it, then the server does not like the post data that I submitted, I assume.  If that is the case, can somebody comment on the data below - this is sample data cribbed from the documentation, in an attempt to get something working.  Thanks for any help.
 
(sample post data follows):
 
------=_Part_0_25934938.1266495790627
Content-Type: application/atom+xml
<?xml version=&apos;1.0&apos; encoding=&apos;UTF-8&apos;?><entry xmlns=&apos;http://www.w3.org/2005/Atom&apos;
xmlns:apps=&apos;http://schemas.google.com/apps/2006&apos;>
<category scheme=&apos;http://schemas.google.com/g/2005#kind&apos; term=&apos;http://schemas.google.com/apps/2006#mailItem&apos;/>
<atom:content xmlns:atom=&apos;http://www.w3.org/2005/Atom&apos; type=&apos;message/rfc822&apos;/>
<apps:mailItemProperty value=&apos;IS_INBOX&apos;/>
------=_Part_0_25934938.1266495790627
Content-Type: message/rfc822
MIME-Version: 1.0
Received: by 10.216.170.147 with HTTP; Fri, 26 Mar 2010 12:54:28 -0700 (PDT)
Date: Sat, 27 Mar 2010 03:54:28 +0800
Delivered-To: da...@example.com
Message-ID: <203b3a4f1043461254v148...@mail.gmail.com>
Subject: hello multipart
From: Elizabeth Bennet <ben...@example.com>
To: Fitzwilliam Darcy <da...@example.com>
Content-Type: multipart/alternative; boundary=000e0cdf7740f8017e0482b9877a
--000e0cdf7740f8017e0482b9877a
Content-Type: text/plain; charset=ISO-8859-1
howdy multipart!
--000e0cdf7740f8017e0482b9877a
Content-Type: text/html; charset=ISO-8859-1
howdy multipart!
--000e0cdf7740f8017e0482b9877a--
------=_Part_0_25934938.1266495790627

Claudio Cherubino

unread,
Mar 1, 2012, 9:00:20 PM3/1/12
to google-app...@googlegroups.com
Hi Jeffrey,

The Email Migration API doesn't support OAuth2, we recommend to use OAuth 1.0 with it:


Claudio

--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/P82h90SUbaMJ.
To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.

Jeffrey McKay

unread,
Mar 1, 2012, 11:35:20 PM3/1/12
to google-app...@googlegroups.com
I do recall seeing some documentation to the effect that OAuth2 could be used with *all* Google APIs - will
this be supported at some point? 
Reply all
Reply to author
Forward
0 new messages