Yodlee: how to know if a MFA is required before a refresh - refresh

Before fetching the latest transactions, I want to trigger a refresh via https://developer.yodlee.com/Aggregation_API/Aggregation_Services_Guide/Aggregation_REST_API_Reference/startRefresh7 but I can't find any information on the refreshMode.
What is the difference between:
MFA_REFRESH_MODE
NORMAL_REFRESH_MODE
I don't want to start the MFA flow if it is not necessary.
Thanks for your help.
PS: I am using fastlink for adding sites

MFA_REFRESH_MODE is for accounts which require MFA(Multi factor authentication) and NORMAL_REFRESH_MODE for accounts which does not require MFA.
If you are using FastLink for account aggregation then you should be using startSiteRefresh API. You can pass in the only mandatory fields and then follow the refresh flow from the flow diagram.
Here you will not have to worry about passing the refresh mode into the API.

Related

Making scheduled requests to Google APIs with service accounts

I have a flask website.
i would like the user to be able to schedule repeated requests for data from one of their Google accounts (let's say Gmail).
From within the website, the user would first authorize the application to access their private Gmail data. From then on, the application, would retrieve the user's Gmail data on a re-occurring basis, without needing to get authorization each time.
Is this possible? I know it would require a service account but can anyone point me in the direction of documentation that describes how this particular scenario might work.
Would such a scenario be allowed to persist long term? Or will their come a time when Google will require the user to reauthorize the application?
Correction, you should not use App Passwords. OAuth is the correct way to do it I believe:
https://www.oauth.com/oauth2-servers/signing-in-with-google/
Here's Google's docs on it, which is more specific to your need:
https://developers.google.com/identity/protocols/oauth2

Migrating existing Login flow using Instagram Legacy API to the new Instagram Basic graph API

Our application (kind-of got legacy) has been using IG API to authorize users (by using the uid attribute returned from IG's callback API response) and we have left email as an optional param (safe to assume that there are many users in the application database without email IDs persisted)
With new Instagram Basic Display API (advised), it's mentioned to use Facebook Login for authentication purpose. But I am facing a major problem of identifying existing users now (since the uid will be different).
Also I have a doubt on what will have happen for users having instagram account without linking their Facebook account to it?
I could not find a proper explanation or a documentation for seamless migration for my situation.
Please help with sharing the right resource or guidance to achieve the same.

Is it possible to use the Google Admin SDK to remove/disable two-factor authentication & app-specific passwords and, if so, how?

I've looked through the documentation; I can find out how to revoke the backup codes but I can't see an option to explicitly disable two-factor authentication or to revoke any app-specific passwords.
Thanks.
Philip
Auditing and revoking Application Specific Passwords (ASPs) can be done via the Directory API within the Admin SDK as detailed here. You can also audit the access tokens for a given user with the same API.
I don't believe it's possible to enable/disable 2-step verification (2SV) for a specific user. That being said, you can move them with the Directory API into/out of an OU with/without 2SV enforced/disabled to accomplish this.

Using eve to limit user access

I have two different objects in my API, we can call them users as tasks. I want to shape the API so users can only access tasks associated with them, but admin can access all tasks. How would I check to make sure what they are requesting matches their username? I have login working as per http://code.tutsplus.com/tutorials/building-rest-apis-using-eve--cms-22961 but I'd like to be able to create a more encompassing API.
You might resort to User Restricted Resource Access
When this feature is enabled, each stored document is associated with the account that created it. This allows the API to transparently serve only account-created documents on all kinds of requests: read, edit, delete and of course create. User authentication needs to be enabled for this to work properly.
See the relevant documentation at the link above.

Auotmated Data Updates to Salesforce

I am working on a website's internal applications and what we want to do is to programmatically update our sales force data via api. For example, to update some entities on a a cronjob etc.
Generally this seems to imply the need for an admin type user that can acquire an access token and make REST Api calls. We could go about doing that, however, salesforce requires a password change every 60 days. How can I get purely programmatic access to our salesforce account?
Thanks in advance.
You're correct that it is a best practise to set up a dedicated API/Integration user. You can make a permission set with the "Password Never Expires" system permission enabled. Add that to your integration user and you're good to go.