Yodlee process MFA with null mfaInfo.fieldInfo - yodlee

According to
https://developer.yodlee.com/Aggregation_API/Aggregation_Services_Guide/API_Flow/Refresh_Account
once I've received response with isMessageAvailable = true and errorCode is empty I should call getMFAResponse (actually I'm using getMFAResponseForSite)
this response should contain not null mfaRefreshInfo.fieldInfo. Unfortunately all cases I was able to test fieldInfo were null.
Could you please help me to understand what I'm doing wrong. SiteAccountId is 10038630.

If you are using getMFAResponseForSite then use this refresh flow
Now response of getMFAResponseForSite depends upon how soon yodlee encounters the MFA after login attempt.
There are 3 types of responses you can get -
{ "isMessageAvailable": false, "timeOutTime": 0, "itemId": 0,
"memSiteAccId": 10000502, "retry": true }
On your 1st call to the MFA API you may get this if there is a delay in bringing the MFA data , hence you need to go back and call this API again (as suggested in the flow to loop).In this case if with messageAvailable if false and timeoutTime > 0 then it means that Yodlee has timed out the request and you can abort the refresh and try re-initiating it.
{
"isMessageAvailable": true,
"fieldInfo": {
"responseFieldType": "text",
"minimumLength": -1,
"maximumLength": 6,
"displayString": "Security Key"
},
"timeOutTime": 97640,
"itemId": 0,
"memSiteAccId": 10000052,
"retry": false
}
This is the case where you get the MFA response. Here you can see that isMessageAvailable is true and you have field info populated. This response can come at 1st call of getMFAResponseForSite or after 1 or 2 loops.
{
"isMessageAvailable": true,
"fieldInfo": {
"questionAndAnswerValues": [],
"numOfMandatoryQuestions": -1
},
"timeOutTime": 98480,
"itemId": 0,
"errorCode": 0,
"memSiteAccId": 10039332,
"retry": false
}
In this case you can see that there is an error code present, if it's 0(zero) that means login was successful without MFA and Yodlee is able to navigate to account summary page. In case error code is non zero then please refer error code page
Now in your case the siteAccountID is failing with error code 429 and hence you should be getting that information in getMFAResponseForSite API.
can you make sure you are following the right refresh flow and making the right API calls as ideally the behavior will not change from what is represented in the flow diagram.

Related

How to keep axios get request running till we get specific result in response

My axios get call takes few seconds to have result as 'succeeded' as below result
{
"status": "succeeded",
"createdDateTime": "2022-12-01T02:42:04Z",
"lastUpdatedDateTime": "2022-12-01T02:42:06Z",
"analyzeResult": {
"version": "3.2.0",
"modelVersion": "2022-04-30",
"readResults": [
{
"page": 1,
"angle": 12.8499,
"width": 1
However sometimes I get below response with status running with no analyzeResult.
{
"status": "running",
"createdDateTime": "2022-12-01T02:42:04Z",
"lastUpdatedDateTime": "2022-12-01T02:42:06Z",
What should be the way to have api call running till we get status as succeeded.
I tried below code with async await and also then catch
const result= await axios.get(url,headers)
console.log(result.data)
This has nothing to do with async/await, If I understand this correctly Backend is sending the response with the status key, and FE will start executing once the response is received. It does not care about status.
Solution:
Ask the backend to wait until the operation gets completed and then send the response.
Send the response with the status key as soon as the operation starts, and expose another API for checking the status of the operation. This is useful when operations take more time.

Strapi API register returning a 400 error

I’ve been creating a web app with a login and a registration function and so far everything has been going great. I managed to connect the app to the api/auth/local api endpoint and send some nice post requests.
Now, I’ve been trying to send requests to the http://localhost:1337/api/auth/local/register endpoint and without any success. I’ve been doing this according to:
https://docs.strapi.io/developer-docs/latest/plugins/users-permissions.html#registration
I keep getting a 400 error:
{
"data": null,
"error": {
"status": 400,
"name": "ApplicationError",
"message": "An error occurred during account creation",
"details": {
}
}
}
If I try to send a request with an email that’s already registered in strapi, the response will give me the correct error:
{
"data": null,
"error": {
"status": 400,
"name": "ApplicationError",
"message": "Email is already taken",
"details": {
}
}
}
In the public and authenticated user roles, I’ve allowed every single one of them, for now.
Enable confirmation emails are set to false.
Email confirmation
Public user permission
For the headers, I’m using Content-type : application/json
the raw json body I'm posting:
{
"email": "manager1#strapi.io",
"password": "testtest1",
"username": "manager1"
}
This is my first project with strapi and so far it went pretty well. I’m not sure if I’m missing out on something or if I’m doing something else wrong.
Any help is appreciated!
I figured it out, it wasn’t as complicated as I expected.
In the user I had different fields, like firstName, lastName etc. All of these fields were required.
I made the fields not required, and now it works.

Linkedin endpoint adAnalyticsV2

I am having an issue in getting the data from LinkedIn API , I have got the permissions and trying postman to test endpoint to get data mention below is my get request , every time the response is an empty elements list with 200 ok. any help in this regard will be highly appreciated. I am sure that their is data its not that there is no activity but cant retrieve via api request.
https://api.linkedin.com/v2/adAnalyticsV2?q=analytics&dateRange.start.year=2019&dateRange.start.month=5&dateRange.start.day=28&dateRange.end.year=2021&dateRange.end.month=9&dateRange.end.day=30&timeGranularity=DAILY&pivot=MEMBER_COMPANY&projection=(*,elements*(externalWebsiteConversions,dateRange(*),impressions,landingPageClicks,likes,shares,costInLocalCurrency,pivot,pivotValue~(localizedName)))&fields=externalWebsiteConversions,dateRange,impressions,landingPageClicks,likes,shares,costInLocalCurrency,pivot,pivotValue&accounts[0]=urn:li:sponsoredAccount:123456789
and this is the response every time
{
"paging": {
"count": 10,
"start": 0,
"links": []
},
"elements": []
}

HTTP 500 on Podio GET item

When fetching GET https://api.podio.com/item/1259778758 (other items work fine), I get the following error:
HTTP 500
with response body:
{
"error_parameters": {},
"error_detail": null,
"error_propagate": false,
"request": {
"url": "http://api.podio.com/item/1259778758",
"query_string": "",
"method": "GET"
},
"error_description": "An unexpected error occured during execution",
"error": "unexpected"
}
I assume this is due to some field value, but cannot figure this out. Can you please check an fix this?
Additional notes:
It is not possible to open this item in the browser as well
The filter operation in the API fails as well when this item is in the result.
It sounds like this should be escalated with Podio technical support.

Yodlee AddSiteAccount1 issues

I am trying to verify various MFA based accounts Yodlee API by performing following steps:
Successful call to addSiteAccount1
In response, it does return siteAccountId
In response, it also provides site refresh status that REFRESH_TRIGGERED
if resp['siteRefreshInfo']['siteRefreshMode']['refreshMode'] == 'MFA' and
resp['siteRefreshInfo']['isMFAInputRequired'] == True and
resp['siteRefreshInfo']['siteRefreshStatus']['siteRefreshStatus'] ==
'REFRESH_TRIGGERED'
Now, calling getMFAResponseForSite repeatedly together with getSiteRefreshInfo results into initially code 801 and than 508 eventually timeout.
Eventually, I come out of the loop with result isMessageAvailable: True
{u'itemId': 0,
u'retry': False, u'timeOutTime': 99880, u'memSiteAccId': 10144098,
u'errorCode': 0, u'isMessageAvailable': True, u'fieldInfo':
{u'questionAndAnswerValues': [], u'numOfMandatoryQuestions': -1,
u'mfaFieldInfoType': u'SECURITY_QUESTION'}}
The only concern I have is that it provides mfaFieldInfoType, but it doesn't provide the actual question.
Couple questions:
a. How do I retrieve proper MFA question(s) for the site?
b. If user is initially coming into system and would like to link account more than couple second wait for user will kill the experience - so what's the recommended time period to be allowed to get MFA question?
c. Is this due to development vs. production environment difference?
d. I can retrieve account and holdings details for account, however than the account results in NON_REFRESHABLE state.
After calling addSiteAccount1 API, you get siteAccountId for an account.
Pass the siteAccountId to getMFAResponseForSite API and keep polling until you get the MFA form. then pass the MFA form with valid values to putMFARequestForSite API.
Please refer to our API flow- https://developer.yodlee.com/Aggregation_API/Aggregation_Services_Guide/API_Flow/Add_Site_Account
Blockquote
Sample response-
{ "isMessageAvailable": true, "fieldInfo": {
"questionAndAnswerValues": [
{
"question": "What is the name of your state?",
"questionFieldType": "label",
"responseFieldType": "text",
"isRequired": "true",
"sequence": 1,
"metaData": "QUESTION_1"
},
{
"question": "What is the name of your first school",
"questionFieldType": "label",
"responseFieldType": "text",
"isRequired": "true",
"sequence": 2,
"metaData": "QUESTION_2"
}
],
"numOfMandatoryQuestions": 2,
"mfaFieldInfoType": "SECURITY_QUESTION" }, "timeOutTime": 97340, "itemId": 0, "memSiteAccId": 10003775, "retry": false }