我无法让addSiteAccount1
API发挥作用。我正在使用.NET,但我不相信这与我的问题有关。似乎我在请求中遗漏了一些内容,但是我已经阅读了文档和其他帖子,但无法弄清楚可能缺少的内容。
这是我的请求(从Fiddler捕获):
cobSessionToken <<REMOVED>>
userSessionToken <<REMOVED>>
siteId 2852
credentialFields[1].valueMask LOGIN_FIELD
credentialFields[1].valueIdentifier PASSWORD
credentialFields[1].value <<REMOVED>>
credentialFields[1].size 20
credentialFields[1].name PASSWORD
credentialFields[1].maxLength 20
credentialFields[1].isOptionalMFA False
credentialFields[1].isOptional False
credentialFields[1].isMFA False
credentialFields[1].isEscaped False
credentialFields[1].isEditable True
credentialFields[1].helpText 5372
credentialFields[1].fieldType.typeName IF_PASSWORD
credentialFields[1].fieldInfoType com.yodlee.common.FieldInfoSingle
credentialFields[1].displayName Passcode
credentialFields[0].valueMask LOGIN_FIELD
credentialFields[0].valueIdentifier LOGIN
credentialFields[0].value <<REMOVED>>
credentialFields[0].size 20
credentialFields[0].name LOGIN
credentialFields[0].maxLength 40
credentialFields[0].isOptionalMFA False
credentialFields[0].isOptional False
credentialFields[0].isMFA False
credentialFields[0].isEscaped False
credentialFields[0].isEditable True
credentialFields[0].helpText 5371
credentialFields[0].fieldType.typeName IF_LOGIN
credentialFields[0].fieldInfoType com.yodlee.common.FieldInfoSingle
credentialFields[0].displayName Online ID
这是回复:
HTTP/1.1 200 OK
X-Powered-By: Unknown
yodlee-ref-id: q1464831683738d12W27T
Set-Cookie: JSESSIONID=6E8CF7DA66E80B567118AF1956589519; Path=/services; Secure
Content-Type: application/json
Transfer-Encoding: chunked
Date: Thu, 02 Jun 2016 01:41:22 GMT
Server: Unknown
{"errorOccurred":"true","exceptionType":"com.yodlee.core.IllegalArgumentValueException","referenceCode":"_54f9c9b6-60f9-49d9-8aa6-43542d7ec598","message":"Null argument specified"}
我还尝试了建议的答案(删除fieldInfoType
并添加enclosedType
):
cobSessionToken <<REMOVED>>
userSessionToken <<REMOVED>>
siteId 2852
credentialFields.enclosedType com.yodlee.common.FieldInfoSingle
credentialFields[0].displayName Online ID
credentialFields[0].fieldType.typeName IF_LOGIN
credentialFields[0].helpText 5371
credentialFields[0].maxLength 40
credentialFields[0].name LOGIN
credentialFields[0].size 20
credentialFields[0].value <<REMOVED>>
credentialFields[0].valueIdentifier LOGIN
credentialFields[0].valueMask LOGIN_FIELD
credentialFields[0].isEditable True
credentialFields[0].isOptional False
credentialFields[0].isEscaped False
credentialFields[0].isOptionalMFA False
credentialFields[0].isMFA False
credentialFields[1].displayName Passcode
credentialFields[1].fieldType.typeName IF_PASSWORD
credentialFields[1].helpText 5372
credentialFields[1].maxLength 20
credentialFields[1].name PASSWORD
credentialFields[1].size 20
credentialFields[1].value <<REMOVED>>
credentialFields[1].valueIdentifier PASSWORD
credentialFields[1].valueMask LOGIN_FIELD
credentialFields[1].isEditable True
credentialFields[1].isOptional False
credentialFields[1].isEscaped False
credentialFields[1].isOptionalMFA False
credentialFields[1].isMFA False
这是回复:
HTTP/1.1 200 OK
X-Powered-By: Unknown
yodlee-ref-id: q1465437863468f12C27S
Set-Cookie: JSESSIONID=3600322EF154E726209C217844FF935E; Path=/services; Secure
Content-Type: application/json
Transfer-Encoding: chunked
Date: Thu, 09 Jun 2016 02:04:22 GMT
Server: Unknown
{"errorOccurred":"true","exceptionType":"com.yodlee.core.IncompleteArgumentException","referenceCode":"_418a82c7-90b9-4a1f-8aad-87ba16cfbb67","message":"Incomplete argument: FieldInfoSingle: {FieldInfo: name=\"null\" displayName=\"null\" editable=false optional=false helpText=\"null\" valuePattern=\"null\" } defaultValue=\"null\" value=\"null\" validValues=[null] displayValidValues=[null] valueIdentifier=\"null\" valueMask=\"null\" fieldType=\"null\" validationRules=[null] size=null maxlength=null userProfileMappingExpression=null fieldErrorCode=null fieldErrorMessage=null "}
我可以告诉null参数可能是什么......
答案 0 :(得分:0)
在您的登录表单中添加
credentialFields.enclosedType com.yodlee.common.FieldInfoSingle
而不是
credentialFields[1].fieldInfoType com.yodlee.common.FieldInfoSingle
credentialFields[0].fieldInfoType com.yodlee.common.FieldInfoSingle
希望这有帮助。