ForumsDevelopersAPI from Google Scripts Javascript?


API from Google Scripts Javascript?
Author Message
PT_Ken

Posted: Aug 24, 2016
Score: 1 Reference
I'd like to create a Google Script that can extract certain tasks from Toodledo. I've read that this was not previously supported but that it may be someday. I'm writing today to ask if there has been any progress on this. Is it possible to use a Google Script to access Toodledo via the API?

Thank you.
Jake

Toodledo Founder
Posted: Aug 24, 2016
Score: 0 Reference
Are you talking about Google App Scripts?

https://www.google.com/script/start/
PT_Ken

Posted: Aug 24, 2016
Score: 1 Reference
Yes. I'd like to access certain Toodledo tasks from this script with the idea of sending it by email to Evernote inbox, or similar types of interfaces that accept email.
Jake

Toodledo Founder
Posted: Aug 24, 2016
Score: 0 Reference
I am not familiar with Google App Scripts, so I'm not sure. I'll have to research it. If it can do OAuth authentication, then it should work.
PT_Ken

Posted: Aug 24, 2016
Score: 1 Reference
It looks like it's not supported directly, but there is a means for implementing the authorization:

https://developers.google.com/apps-script/guides/services/external

My post was in response to previous posts I saw that stated Javascript was unable to access the API, and also this thread <https://www.toodledo.com/forums/7/19548/0/google-apps-scripts.html>

Thanks.
Ken
Jake

Toodledo Founder
Posted: Aug 24, 2016
Score: 0 Reference
If its only JS then it won't work. We haven't worked out the security aspect of letting JS access our API yet.
PT_Ken

Posted: Aug 25, 2016
Score: 1 Reference
Posted by Jake:
If its only JS then it won't work. We haven't worked out the security aspect of letting JS access our API yet.


Does this statement from the apps-script guide solve that problem? I keep asking because I don't want to invest my time if it isn't going to work. Thanks for your help, by the way!

APIs that act on behalf of a user usually require authorization, often using the OAuth protocol. Apps Script doesn't provide built-in support for the protocol, but there are open source libraries you can use to perform the OAuth flow and send the credentials with your requests:

OAuth1 for Apps Script: Compatible with OAuth 1.0 and 1.0a.
OAuth2 for Apps Script: Compatible with OAuth2.
Jake

Toodledo Founder
Posted: Aug 25, 2016
Score: 0 Reference
You would need to use one of the third party OAuth2 libraries. But it should work if you do.
PT_Ken

Posted: Aug 25, 2016
Score: 1 Reference
Fantastic. Then it looks like I will move forward. One last question. To register my app with Toodledo, a web site and redirect URI are required. How can I register my app if I will not have either of these? This app will be for private distribution only and will simply exist as a Google App Script.

Thank you.
Jake

Toodledo Founder
Posted: Aug 25, 2016
Score: 0 Reference
You can just put in a dummy website if you don't have one and its for private use.

For the redirect URL, consult your 3rd party OAuth2 library. It may need something specific.
PT_Ken

Posted: Aug 26, 2016
Score: -1 Reference
Okay, thank you! Off to code...
ernesto.ju

Posted: Feb 08, 2017
Score: 1 Reference
Is there an example how to connect to toodledo with google apps scripts?

This message was edited Feb 08, 2017.
You cannot reply yet

U Back to topic home

R Post a reply

To participate in these forums, you must be signed in.