【问题标题】:Authenticating the cobrand验证联合品牌
【发布时间】:2014-09-02 12:03:56
【问题描述】:

我创建了一个新的开发者帐户,但在使用 REST API 进行身份验证时遇到问题。

POST https://rest.developer.yodlee.com/services/srest/restserver/v1.0/authenticate/coblogin

{ cobrandLogin: 'sbCob*****',
  cobrandPassword: '**********' }

系统响应:

{ Error: [ { errorDetail: 'Internal Core Error has occurred' } ] }

我做错了吗?

【问题讨论】:

  • 我得到了同样的回应。你找到解决办法了吗?
  • @Ranvijay 检查我的答案 ;)

标签: yodlee


【解决方案1】:

我正在使用 Postman 测试 API,显然我需要使用 x-www-form-urlencoded 发送参数以使其工作。使用默认的form-data 会导致上述错误。

【讨论】:

    【解决方案2】:

    在我的情况下,这是通过根据http://developer.yodlee.com/Aggregation_API/Aggregation_Services_Guide/Aggregation_REST_API_Reference 更改内容类型来解决的

    require 'rest-client'
    module Yodlee
    
        def self.login_to_yodlee
            site = self.site_resource
    
            login_hash = {
                cobrandLogin: 'yourlogin',
                cobrandPassword: 'yourpassword'
    
            }
            begin
                response = site["/authenticate/coblogin"].post login_hash, :'content-type' => 'application/x-www-form-urlencoded'
                puts response
            rescue RestClient::ResourceNotFound => ex
                raise Exception.new(ex.response)
            rescue Exception => ex
                raise Exception.new(ex)
            end
        end
    
        def self.site_resource
            RestClient::Resource.new('https://rest.developer.yodlee.com/services/srest/restserver/v1.0')
        end
    
    end
    
    Yodlee.login_to_yodlee
    

    【讨论】:

      【解决方案3】:

      通常,当您没有正确提供输入参数的名称时会出现此错误;而在上面提到的代码中,我可以看到它们都是正确的。我建议您也请仔细检查输入参数名称(区分大小写)。顺便提一下,您应该将其作为两个不同的参数发送,即“cobrandLogin”和 cobrandPassword。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2020-05-20
        • 1970-01-01
        • 2021-09-01
        • 1970-01-01
        • 1970-01-01
        • 2018-01-30
        • 2019-09-26
        相关资源
        最近更新 更多