Yodlee Token authentication failed for cobrand/user Stale conversation credentials</errorDetail> - yodlee

I sometime get this error while trying to add Accounts(v1.0/jsonsdk/SiteAccountManagement/addSiteAccount1) or get MFA Response(v1.0/jsonsdk/Refresh/getMFAResponseForSite)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Errors xmlns="http://namespace.yodlee.com/pfm/2009/Error">
<Error>
<errorDetail>Token authentication failed for cobrand/user Stale conversation credentials</errorDetail>
</Error>
</Errors>
can someone help me that issue.
Thank you.

Yodlee doesn't allow multiple user login and hence this exception comes when you have logged in the user again by calling the Login(/authenticate/login​) API and still using the old userSessionToken.
Please use the login (/authenticate/login​) call once and use the same userSessionToken for all the API calls for next 25-30 minutes.

Related

Salesforce Merge API authentication using Bearer token

Im completely new to Salesforce and API's.
Im trying to make a Merge record call using SOAP API . Using Postman for the same .
I have imported the WSDL to my local , Called Login method to get the serverURL and sessionId.
Using these parameters to make subsequent merge calls .
During the login , I have used username and password to authenticate .
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<login xmlns="urn:enterprise.soap.sforce.com">
<username>username</username>
<password>password+auth_token</password>
</login>
</soap:Body>
</soap:Envelope>
and getting the below response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<loginResponse>
<result>
<metadataServerUrl>https://**company_name**--dev.my.salesforce.com/services/Soap/m/54.0/00D0Q0000000QP8</metadataServerUrl>
<passwordExpired>false</passwordExpired>
<sandbox>true</sandbox>
<serverUrl>https://**company_name**--dev.my.salesforce.com/services/Soap/c/54.0/00D0Q0000000QP8/0DF0Q0000004Ct6</serverUrl>
<sessionId>**masked**</sessionId>
<userId>xxx</userId>
<userInfo>
.....
</userInfo>
</result>
</loginResponse>
</soapenv:Body>
</soapenv:Envelope>
Later im making the Merge call using the session ID returned from the above .
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com"> xmlns:sobject="urn:sobject.enterprise.soap.sforce.com">
<soap:Header>
<urn:SessionHeader>
<urn:sessionId>**masked**</urn:sessionId>
</urn:SessionHeader>
</soap:Header>
<soap:Body>
<merge xmlns="urn:enterprise.soap.sforce.com">
<request>
<masterRecord xsi:type="sobject:Account" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Id xmlns="urn:sobject.enterprise.soap.sforce.com">0010Q00001abcdefgh</Id>
</masterRecord>
<recordToMergeIds>0010Q00001ijklmnop</recordToMergeIds>
</request>
</merge>
</soap:Body>
</soap:Envelope>
and able to merge the records.
My question is - what should the body be if i donot want to use username and password but use Bearer token.
Can i call the login method without passing username and password?
You might be a victim of XY problem. You can't do it in SOAP API, will REST API be an option?
SOAP API's login call demands username and password (+ optional "security token", extra thing you add to password if you log in from untrusted IP). There are no other ways around it.
REST API has more options for logging in but it'd help if you read up about OAuth2 a bit before diving in. You call login and (similar to SOAP API) get back endpoint to use from now on and access_token. That access_token acts like SOAP APIs session id, you use it in next requests. Most of the time they should be interchangeable, access_token obtained via REST should be good to use in SOAP API calls.
If you already have session id / access token (will look like "00D...!....", first part is org id which you can see in Setup -> Company information for example) - you don't need login call. Call the SOAP API's merge directly and pass that value in <urn:sessionId>.
If you don't have session id, want to log in but without hardcoding username and password in your application... You have LOTS of options. Selecting right method is an art and it depends what are you making. A website, a mobile app? For internal users or community? Will it hold some credentials (for example if it needs sysadmin powers, working in background without human interaction) or will it show users the SF login screen and redirect back to the app? There's even "Internet of Things" stuff for pieces of equipment reporting their status to SF or logging in on device without keyboard (TV, fridge) where you initiate process there and finish on laptop or phone...
If you've never heard about OAuth2 before it's a big topic, "login with Google/Facebook/Twitter/LinkedIn" is just a piece of it. You'll be better off reading some blogs, checking out https://trailhead.salesforce.com/en/content/learn/trails/build-integrations-using-connected-apps or even studying to the Identity and Access Manager certification. Clicking through https://openidconnect.herokuapp.com/ might help too.
There's "username-password flow" which looks almost like SOAP API's login.
There's web server flow and user-agent flow for websites & mobile apps to send user to SF login screen (can be really SF, can be some single sign-on, doesn't matter) and back to the app. So your app doesn't see the password, doesn't see any credentials
There's refresh token option in some of these flows (you logged in once with another method, your app received access_token but also refresh_token. When access expires - app can use refresh_token to silently get back to the system without asking user to log in again. For 60 days for example). So you could still have initial "human authorises connection between the apps" but then it can just work in the background
There's JWT flow which you'll have hard time trying in Postman but there are examples such as this and this. You establish trust between SF and your app by uploading a certificate to Salesforce, marking user as allowed to use this method and then the app sends a special request just with username, no password needed.

eBay notifications are not being received

I am trying to receive notifications for ItemListed from the Ebay API on Production.
I have successfully subscribed to Ebay's notifications although I am not receiving any mail or call to the specified URL upon actions that I surely know have happened.
I logged in to my developers account and set the right URL and email for notifications.
This is the XML code for the subscription:
<?xml version="1.0" encoding="utf-8"?>
<SetNotificationPreferencesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<!-- Use the Developer portal or the <ApplicationDeliveryPreferences> container to set
the Application delivery settings -->
<RequesterCredentials>
<eBayAuthToken></eBayAuthToken>
</RequesterCredentials>
<ErrorLanguage>en_US</ErrorLanguage>
<WarningLevel>High</WarningLevel>
<ApplicationDeliveryPreferences>
<!--Enter an email address-->
<AlertEmail>mailto://email#email.com</AlertEmail>
<AlertEnable>Enable</AlertEnable>
<ApplicationEnable>Enable</ApplicationEnable>
<ApplicationURL>MYHHTPSURL</ApplicationURL>
<DeviceType>Platform</DeviceType>
<DeliveryURLDetails>
<DeliveryURL>MYHTTPSURL</DeliveryURL>
<DeliveryURLName>TEST</DeliveryURLName>
<Status>Enable</Status>
</DeliveryURLDetails>
</ApplicationDeliveryPreferences> -->
<!-- Use the UserDeliveryPreferenceArray to enable to the user for various Event -->
<UserDeliveryPreferenceArray>
<NotificationEnable><EventType>ItemListed</EventType>
<EventEnable>Enable</EventEnable>
</NotificationEnable>
</UserDeliveryPreferenceArray>
</SetNotificationPreferencesRequest>
I am adding a pastebin link with the GetNotificationPreferences:
https://pastebin.com/JBAnnX8d
To me everything seems completely fine. Anyone can shed some light?
Might be helpful to people having this problem in the future. I solved it by
authenticating to the API through eBay's authnauth system. Weird solution but works.

Getting Login Faliure with error code 0

I'm using Yodlee SOAP API endpoints and in my error logs I'm getting Site Refresh Status as LOGIN_FAILURE with error code 0 (which as I understand is not an error according to Yodlee docs). I was wondering what could be the cause of this? Is it an expected behavior? I'm assuming this is not a successful login.
Here is the returned xml:
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns21:getSiteRefreshInfoResponse xmlns:ns21="http://refresh.refresh.core.soap.yodlee.com">
<getSiteRefreshInfoReturn><siteRefreshStatus>LOGIN_FAILURE</siteRefreshStatus>
<siteRefreshMode>NORMAL_REFRESH_MODE</siteRefreshMode>
<code>0</code>
</getSiteRefreshInfoReturn>
</ns21:getSiteRefreshInfoResponse>
</soapenv:Body></soapenv:Envelope>
Thanks,
I contacted Yodlee Support and I got the answer that it is expected behaviour and users need to login again to get the instant refresh and refreshing sites should work again.

When using Quickbooks Online API Collections for Postman I'm getting an Authentication Error

I've gone through the steps shown here https://developer.intuit.com/docs/0100_quickbooks_online/0100_essentials/000300_your_first_request/first_request_with_postman#/Configuring_the_Postman_Authorization_header-1500 to use Quickbook's API Collection for Postman.
In Postman, I was successfully able to get a new access token. I also updated the {{baseurl}} to be "sandbox-quickbooks.api.intuit.com", and updated the {{companyid}} (aka the "RealmId") to be the appropriate value as shown in the "Manage Sandboxes" page of the developer site (i.e. https://developer.intuit.com/v2/ui#/sandbox).
BUT when I click "send" on the "Customer-ReadById" query (or any other query in the collection), I get the following Authentication error:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2017-08-16T11:52:00.611-07:00">
<Fault type="AuthenticationFault">
<Error code="100">
<Message>General Authentication Error</Message>
<Detail>AuthenticationErrorGeneral: SRV-110-Authentication Failure , statusCode: 401</Detail>
</Error>
</Fault>
</IntuitResponse>
My next step was to verify that I can query my sandbox using the OAuth 2.0 Playground tool on the developers site, which I can indeed do.
My questions then are: why am I getting this authentication error in Postman? Am I missing a step? Or has something changed in the Quickbooks Online API that has not yet been documented?
EDIT: I've managed to resolve my own issue after a decent amount of trial and error, and with a hint based on a response in the Quickbooks Online help area.
For those who may find this useful, my solution was to request a new access token (click "Get New Access Token" in Postman) and updated the "Scope" section to include "openid" such that the space delimited list read:
com.intuit.quickbooks.accounting openid profile email phone address
Using this new token with the updated scope allowed me to get the desired results.
I had the same problem but I resolved it differently. My issue was that in the requested token, the default to "Add token to" is URL, but it seems that the API requires the token to be in an Authorization header. Changing this to "Header" does just that.
For the "Customer-ReadById" endpoint, the only scope that should be necessary is com.intuit.quickbooks.accounting. My guess is you changed it to Header in your trial and error.

Unable to save resource prestashop webservice

I am new to prestashop web service ,when I add new customer it says one error .
RETURN HTTP BODY
<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<errors>
<error>
<code><![CDATA[46]]></code>
<message><![CDATA[Unable to save resource]]></message>
</error>
</errors>
</prestashop>
can you guys help me how to solve this error..
Error similar to this are documented before. Activate DEBUG MODE and you will be able to see detailed error.
Good luck.