[google-appengine] Re: App Engine to Calendar Authentication

2013-06-12 Thread James Gralton
Thanks for the replies. I decided to use Python and the OAuthDecorator 
which made the task a lot simpler.

On Thursday, 6 June 2013 08:29:32 UTC+1, James Gralton wrote:

 Hi,


 I am new to App Engine and am trying to write an application which will 
 access Google Calendar to get details of any events for the current time. I 
 am struggling to see how the authentication should work to permit access to 
 Calendar. I believe OAuth2 is the preferred authentication option so I have 
 a client_secrets.json file with the ClientID and Client Secret from an API 
 Access project I have separately created:
 {

  

 web:{ 

 auth_uri:https://accounts.google.com/o/oauth2/auth;, 

 client_secret:xxx, 

 token_uri:https://accounts.google.com/o/oauth2/token;, 

 client_email:...@developer.gserviceaccount.com, 

 redirect_uris:[https://myapp.appspot.com/oauth2callback;], 

 client_x509_cert_url:
 https://www.googleapis.com/robot/v1/metadata/x509/...@developer.gserviceaccount.com
 , 

 client_id:123456789.apps.googleusercontent.com, 

 auth_provider_x509_cert_url:https://www.googleapis.com/oauth2/v1/certs;
 , 

 javascript_origins:[https://myapp.appspot.com;] 

 } 

 }



 This was a direct export from the API Access project using the 'Download 
 JSON' option. When I deploy my app engine application I get an error:
 Error: redirect_uri_mismatch

  

 The redirect URI in the request: http://myapp.appspot.com/oauth2callbackdid 
 not match a registered redirect URI 

 Learn more http://code.google.com/apis/accounts/docs/OAuth2.html 

 Request Details 
 scope=https://www.googleapis.com/auth/calendar 
 response_type=code 
 access_type=offline 
 redirect_uri=https://myapp.appspot.com/oauth2callback 
 display=page 
 client_id=123456789.apps.googleusercontent.com


 It all looks fine to me so I am not sure what the error is telling me. Do 
 I need link the App Engine application to the API Access project in some 
 way. Am I missing something else fundamental.


 If there is any additional information which will help you understand the 
 set up please let me know. I wanted to keep the post small.


 Thanks


 James

 Notice:  This email is confidential and may contain copyright material of 
 Ocado Limited (the Company). Opinions and views expressed in this message 
 may not necessarily reflect the opinions and views of the Company.

 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.

 Company reg. no. 3875000.

 Ocado Limited
 Titan Court
 3 Bishops Square
 Hatfield Business Park
 Hatfield
 Herts
 AL10 9NE


-- 
Notice:  This email is confidential and may contain copyright material of 
Ocado Limited (the Company). Opinions and views expressed in this message 
may not necessarily reflect the opinions and views of the Company.

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.

Company reg. no. 3875000.

Ocado Limited
Titan Court
3 Bishops Square
Hatfield Business Park
Hatfield
Herts
AL10 9NE

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] Re: App Engine to Calendar Authentication

2013-06-08 Thread Vinny P
On Thursday, June 6, 2013 2:29:32 AM UTC-5, James Gralton wrote:

 This was a direct export from the API Access project using the 'Download 
 JSON' option. When I deploy my app engine application I get an error:
 Error: redirect_uri_mismatch
 The redirect URI in the request: http://myapp.appspot.com/oauth2callback did 
 not match a registered redirect URI 
 client_id=123456789.apps.googleusercontent.com

 It all looks fine to me so I am not sure what the error is telling me. Do 
 I need link the App Engine application to the API Access project in some 
 way. Am I missing something else fundamental.



Hello James, 

Did you whitelist the redirect URI when you created your application? 

I created an imgur album to show the steps: http://imgur.com/a/UUXyI . On 
the second screen to creating your client application, there is a list of 
URLs that are authorized for redirects; the Authorized Redirect URIs part 
of the screen. You need to put any URI that is allowed to receive 
redirects/callbacks into that text box.

Also make sure your redirect URI is https, as Julie suggested.

-
-Vinny P
Technology  Media Advisor
Chicago, IL

My Go side project: http://invalidmail.com/

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.