ForumsSearch



Search results for "Posted by jj974"
Author Message
jj974

Posted Dec 01, 2014 in: Android API v3 - how to make a folder
Score: 0
  • jj974
  • Posted: Dec 01, 2014
  • Score: 0
Moving 1 step forward ... but getting a very strange result:

I now found a different way of passing the HttpContent

Map<String, String> params2 = new HashMap<String, String>(3);
params2.put("name", folderName);
params2.put("private", "1");
params2.put("access_token", accessToken);
HttpContent httpContent = new UrlEncodedContent( params2);

When I now execute the request, it will LOOP (!) on storing an access token to my credential store. Why? It just used the access_token to list the folders. No problem.
jj974

Posted Nov 30, 2014 in: Android API v3 - how to make a folder
Score: 0
  • jj974
  • Posted: Nov 30, 2014
  • Score: 0
Getting connected from an Android app to Toodledo API v3 works.
So, I know that I have a valid access_token (and refresh token).
GET requests work.

How can I add a folder ... using a POST request?

The code is below ... it keeps on spinning for new access tokens.

HttpResponse response = null;
JSONObject folderJS;
try {
Credential cred = flow.loadCredential( userId);
cred.setAccessToken( accessToken);
cred.setExpirationTimeMilliseconds( accessTokenExpireTime);
cred.setRefreshToken( refreshToken);
String apiCallUrl = "https://api.toodledo.com/3/folders/add.php";

GenericData data = new GenericData();
data.put( "name", folderName);
data.put( "private", "1");
// data.put( "access_token", accessToken); <== is not needed ?

JsonHttpContent httpContent = new JsonHttpContent(new JacksonFactory(), data);
response = HTTP_TRANSPORT.createRequestFactory( cred).buildPostRequest(
new GenericUrl( apiCallUrl), httpContent).execute();
jj974

Posted Nov 28, 2014 in: Authentication - URI correct?
Score: 0
  • jj974
  • Posted: Nov 28, 2014
  • Score: 0
For my new App I try to integrate to Toodledo. I use first the demo App Oauth2 for authentication.

What is the right URI to use?

https://api.toodledo.com/3/account/authorize.php?response_type=code&client_id=mypersonalidddd&state= MTA&scope=basic%20tasks

Can I change that afterwards?

In the demo app, (1) i get a webpage to login, (2) i see the page "appxx" would like to access the following parts ... account settings, i give ALLOW, (3) again i get a page "appxx" would like to access the following parts ... account settings, tasks, folders ... After giving [Allow] nothing happens.


This message was edited Nov 28, 2014.