Get workspace details in podio api - podio

Is there any way to get work space name and URL if the API request is authenticated as app.
Podio::authenticate_with_app($app_id, $app_token);
PodioSpace::get($space_id);
the above code return PodioForbiddenError

Sorry, but the I don't think this is allowed within the scope hierarchy.
Please refer to https://developers.podio.com/authentication/scopes
But, if you only need space name, id, url and couple of other minor details you could still get it by using fields parameter. This is described here: https://developers.podio.com/index/api (scroll down to the end of page).
Here is how I debug it with Ruby:
Podio.client.authenticate_with_app(<app_id>, <app_token>)
app = Podio::Application.find(app_id, {'fields' => 'space.view(full)'})
puts app['space']['name']
puts app['space']['space_id']
puts app['space']['url']

Related

Invoking GET statuses/user_timeline with user_id='' seems to invoke GET statuses/home_timeline. Why?

As I was trying to harvest the user_timelines for a list of user_ids, I noticed that my own home_timeline was also being harvested. In the end I discovered that whenever my list used a null string entry for user_id, executing the code below was the same as executing
twitter_api.statuses.home_timeline. That is ok, but I do not see such behavior Twitter- documented? What am I missing in the documentation?
auth = twitter.oauth.OAuth(OAUTH_TOKEN, OAUTH_TOKEN_SECRET,CONSUMER_KEY, CONSUMER_SECRET)
twitter_api = twitter.Twitter(auth=auth)
twitter_api.statuses.user_timeline(user_id='')
You're correct - if you invoke the Twitter API v1.1 user_timeline method without a user_id or screen_name parameter specified (or null), it will return the user_timeline for the authenticated user making the API call. This is undocumented behaviour.
Note that home_timeline is a different method, and will return Tweets from the users you follow, not your own Tweets. I think you're describing the former (user_timeline), not home_timeline.
I'll make a note to get this added to the official API documentation.

Unable to get loginForm after addSiteAccount to update credentials

I am using the rest api. After retrieving the login form for a site, I input incorrect login information. I need to now go back and correct the mistake. At first I tried calling GetSiteLoginForm, which isn't allowed since the user is already associated to the site. I then tried to SiteTraversal/getSiteInfo with valid cobSessionToken and &siteFilter.reqSpecfier=16&siteFilter.siteId=643.
The response I get is:
{"popularity":0,"siteId":643,"orgId":520,"defaultDisplayName":"Chase (US)","defaultOrgDisplayName":"Chase Manhattan Bank","contentServiceInfos":[{"contentServiceId":663,"siteId":643,"containerInfo":{"containerName":"bank","assetType":1}},{"contentServiceId":10441,"siteId":643,"containerInfo":{"containerName":"bill_payment","assetType":0}},{"contentServiceId":3163,"siteId":643,"containerInfo":{"containerName":"credits","assetType":2}},{"contentServiceId":3483,"siteId":643,"containerInfo":{"containerName":"stocks","assetType":1}},{"contentServiceId":7100,"siteId":643,"containerInfo":{"containerName":"loans","assetType":2}},{"contentServiceId":3861,"siteId":643,"containerInfo":{"containerName":"mortgage","assetType":2}},{"contentServiceId":12049,"siteId":643,"containerInfo":{"containerName":"miles","assetType":0}}],"enabledContainers":[{"containerName":"bank","assetType":1},{"containerName":"bill_payment","assetType":0},{"containerName":"credits","assetType":2},{"containerName":"stocks","assetType":1},{"containerName":"loans","assetType":2},{"containerName":"mortgage","assetType":2},{"containerName":"miles","assetType":0}],"baseUrl":"http://www.chase.com/","loginForms":[],"isHeld":false,"isCustom":false,"siteSearchVisibility":true}
Note loginForms is empty. How do I get this value? I tried different values of siteFilter.reqSpecfier and always get the same result. Other things I tried were using both the our public and private urls. I duplicated all of this with Dag Site as well.
There is typo in one of the input parameters because of which the parameter is not being recognized by our API’s and hence returning Null LoginForms.
[ siteFilter.reqSpecifier is incorrectly spelled as siteFilter.reqSpecfier ]
Your Excerpt from below email:
cobSessionToken=11182013_0%3A8e8a9caa264e3b26f15c3c9a3ee05680b2edb76272d0a425852a803e6002383b89847d388de38394b4f08efbb881536b496e323ee4e42c9df7dfdcdc8ae10e16&siteFilter.**reqSpecfier**=16&siteFilter.siteId=643
This should be :
cobSessionToken=11182013_0%3A8e8a9caa264e3b26f15c3c9a3ee05680b2edb76272d0a425852a803e6002383b89847d388de38394b4f08efbb881536b496e323ee4e42c9df7dfdcdc8ae10e16&siteFilter.**reqSpecifier**=16&siteFilter.siteId=643
With corrected parameter I was able to query Site 643 and get the loginForm Array. Below is the response with loginForms[]
{"popularity":0
"siteId":643
"orgId":520
"defaultDisplayName":"Chase"
"defaultOrgDisplayName":"Chase Manhattan Bank"
"contentServiceInfos":[{"contentServiceId":663}
{"contentServiceId":10441}
{"contentServiceId":3163}
{"contentServiceId":3483}
{"contentServiceId":7100}
{"contentServiceId":3861}
{"contentServiceId":12049}]
"enabledContainers":[{
"containerName":"bank","assetType":1}
{"containerName":"bill_payment","assetType":0}
{"containerName":"credits","assetType":2}
{"containerName":"stocks","assetType":1}
{"containerName":"loans","assetType":2}
{"containerName":"mortgage","assetType":2}
{"containerName":"miles","assetType":0}]
"baseUrl":"http://www.chase.com/"
"loginForms":[{"conjunctionOp":{"conjuctionOp":1}
"componentList":[
{"valueIdentifier":"LOGIN","valueMask":"LOGIN_FIELD","fieldType":{"typeName":"TEXT"},"size":20,"maxlength":32
"name":"LOGIN","displayName":"User ID","isEditable":true,"isOptional":false,"isEscaped":false,"helpText":"4710","isOptionalMFA":false
"isMFA":false},
{"valueIdentifier":"PASSWORD","valueMask":"LOGIN_FIELD","fieldType":{"typeName":"IF_PASSWORD"},"size":20,"maxlength":40
"name":"PASSWORD","displayName":"Password","isEditable":true,"isOptional":false,"isEscaped":false,"helpText":"11976","isOptionalMFA":false
"isMFA":false}
]
"defaultHelpText":"324"}]
"isHeld":false
"isCustom":false
"siteSearchVisibility":true}
This should resolve your problem
Regards,
Vishal
Yodlee Team
The flow for updating the credentials is listed in this article UpdateCredentials Flow
You can follow the exact steps from the article.
Even when the user is associated to a particular site , you can still pull the login form using getSiteLoginForm and show the form to the user to enter the correct credentials and then pass the login form in updateSiteAccountCredentials and then proceed with the normal refresh flow.

I am trying to use Yodlee/executeUserSearchRequest as a RESTful request and need an answer on how to call

I am working with the Yodlee services in c# and using the RESTful api. So far I have successfully connected and logged in with my CobrandSession and UserSessionToken in the development environment. I used the sample apps provided in c# and with some advice from shreyans i got an app working. What I got working was
1) Get YodleeAuthentication
2) Get UserAuthentication
3) Get ItemSummaries
I am now trying to get the full transaction details for each of the Items (i.e. collections of accounts that are an Item)
reading the Docs here https://developer.yodlee.com/Indy_FinApp/Aggregation_Services_Guide/REST_API_Reference/executeUserSearchRequest it states that I need to call executeUserSearchRequest and then paginate through the results using the getUserTransactions. So I am stuck at this point. I dont really want a search which has parameters I just want ALL transactions for this account that I can see.
However, I am using the variables as defined in that page :-
var request = new RestRequest("/jsonsdk/TransactionSearchService/executeUserSearchRequest", Method.POST);
request.AddParameter("cobSessionToken", param.CobSessionToken);
request.AddParameter("userSessionToken", param.UserSessionToken);
request.AddParameter("transactionSearchRequest.containerType", param.ContainerType);
request.AddParameter("transactionSearchRequest.higherFetchLimit", param.HigherFetchLimit);
request.AddParameter("transactionSearchRequest.lowerFetchLimit", param.LowerFetchLimit);
request.AddParameter("transactionSearchRequest.resultRange.endNumber", param.EndNumber);
request.AddParameter("transactionSearchRequest.resultRange.startNumber", param.StartNumber);
request.AddParameter("transactionSearchRequest.searchFilter.currencyCode", param.CurrencyCode);
request.AddParameter("transactionSearchRequest.searchFilter.postDateRange.fromDate", param.FromDate);
request.AddParameter("transactionSearchRequest.searchFilter.postDateRange.toDate", param.ToDate);
request.AddParameter("transactionSearchRequest.searchFilter.transactionSplitType.splitType", param.SplitType);
request.AddParameter("transactionSearchRequest.ignoreUserInput", param.IgnoreUserInput);
request.AddParameter("transactionSearchRequest.searchFilter.itemAcctId", param.ItemAcctId);
var response = RestClientUtil.GetBase().Execute(request);
var content = response.Content;
return new YodleeServiceResultDto(content);
As per the response from shreyans in this posting Getting Error "Any one of [**] of transactionSearchFilter cannot be NULL OR Invalid Values I am not putting in the ClientId and the ClientName
The documentation doesn't specify the format of the dates but the example seems to tell me that its american date format. And specifies a parameter saying IgnoreUserinput, but doesnt have a parameter for user input so this is confusing
When I make a call using this format I get an error response
var getSearchResult = yodleeExecuteUserSearchRequest.Go(yodleeExecuteUserSearchRequestDto);
getSearchResult.Result="
{"errorOccured":"true","exceptionType":"Exception Occured","refrenceCode":"_60ecb1d7-a4c4-4914-b3cd-49182518ca5d"}"
But I get no error message in this and I have no idea what I have done wrong or where to look up this error, can somebody who has used Yodlee REST Api point me in the right direction as I need to get this researched quickly....
thanks your your help, advice, corrections and pointers....
Here is the list of parameters which you can try
1) For a specific ItemAccountId all transactions
transactionSearchRequest.containerType=all
transactionSearchRequest.higherFetchLimit=500
transactionSearchRequest.lowerFetchLimit=1
transactionSearchRequest.resultRange.startNumber=1
transactionSearchRequest.resultRange.endNumber=500
transactionSearchRequest.searchClients.clientId=1
transactionSearchRequest.searchClients.clientName=DataSearchService
transactionSearchRequest.searchFilter.currencyCode=USD
transactionSearchRequest.searchClients=DEFAULT_SERVICE_CLIENT
transactionSearchRequest.ignoreUserInput=true
transactionSearchRequest.ignoreManualTransactions=false
transactionSearchRequest.searchFilter.transactionSplitType=ALL_TRANSACTION
transactionSearchRequest.searchFilter.itemAccountId.identifier=10000353
2) For a Specific account (itemAccountId) with start and end dates
transactionSearchRequest.containerType=all
transactionSearchRequest.higherFetchLimit=500
transactionSearchRequest.lowerFetchLimit=1
transactionSearchRequest.resultRange.startNumber=1
transactionSearchRequest.resultRange.endNumber=500
transactionSearchRequest.searchClients.clientId=1
transactionSearchRequest.searchClients.clientName=DataSearchService
transactionSearchRequest.searchFilter.currencyCode=USD
transactionSearchRequest.searchClients=DEFAULT_SERVICE_CLIENT
transactionSearchRequest.ignoreUserInput=true
transactionSearchRequest.ignoreManualTransactions=false
transactionSearchRequest.searchFilter.transactionSplitType=ALL_TRANSACTION
transactionSearchRequest.searchFilter.itemAccountId.identifier=10000353
transactionSearchRequest.searchFilter.postDateRange.fromDate=08-01-2013
transactionSearchRequest.searchFilter.postDateRange.toDate=10-31-2013

Astrid request returning empty

I'm trying to use the http://Astrid.com API, specifically to get data using the method under the "Request Format" section on this page - http://astrid.com/apidoc/file.README.html
The URL I built is:
https://astrid.com/api/7/task_list?app_id=[MY APP ID]&time=1&user_id=[MY USER ID]&sig=[MY REQUEST SIGNATURE]
And it returns this:
{"list":[],"time":1363131562,"status":"success"}
Seems like it worked, but does anyone know why the "list" array might be returning empty? I've created a bunch of tasks in my profile so it should be showing those.
Thanks!
You need to sign in first with the method user_signin. If successful you get a token.
Then you need to call the task_list method providing the token.
You do not need to provide a user id with the task_list method. It is only used to select tasks that you share with this user.
Example for signing in:
https://astrid.com/api/7/user_signin?provider=password&app_id=YOUR_APP_ID&secret=YOUR_ASTRID_PASSWORD&sig=SIGNATURE&time=1365715302.36&email=YOUR_EMAIL
Example for getting your tasks:
https://astrid.com/api/7/task_list?active=true&token=THE_TOKEN&sig=SIGNATURE&app_id=YOUR_APP_ID&time=1365715304.41

How Can i share a post using the post id

I am using Koala gem and in my UI i have an share link. How can i share the posts using the post id. Can it be done like this.
#facebook = FacebookToken.first
#graph = Koala::Facebook::API.new(#facebook.access_token)
#graph.put_object(params[:post_id], "share",:message => "First!")
It gives the following error
Koala::Facebook::ClientError: type: OAuthException, code: 240, message: (#240) Requires a valid user is specified (either via the session or via the API parameter for specifying the user. [HTTP 403]
I thing something going wrong with permission. I have added the following permission in the fave bool app
"share_item,manage_pages,publish_stream,read_stream,offline_access,create_event,read_insights, manage_notifications"
Do I need to some other permission to share a post using post id
The first parameter in put_object is not the post ID, but the ID of who is sharing it, be it a page or user.
So instead of saying:
#graph.put_object(params[:post_id] ...
You would say:
//the current user
#graph.put_object('me' ...
or
//any user that you have a UID for
#graph.put_object(#user.uid ...
or
//a page that you have post permissions for
#graph.put_object(#facebook_page.id ...
Also in a future version of Koala, put_object will be a bit different, and you should go ahead and switch over to put_connection.