2014-09-02 4 views
4

새로운 개발자 계정을 만들었으며 REST API로 인증하는 데 문제가 있습니다.코브란트 인증

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

내가 뭔가 잘못하고있는 중이 야 :

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

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

시스템이 응답?

+0

나도 같은 반응을 얻고있다 따라 콘텐츠 형식을 변경하여 해결되었다. 어떤 해결책을 찾았습니까? –

+0

@Ranvijay 내 대답을 확인;) – JGutierrezC

답변

0

일반적으로 입력 매개 변수의 이름을 올바르게 입력하지 않으면이 오류가 발생합니다. 위의 언급 된 코드에서 두 가지 모두 옳다는 것을 알 수있었습니다. 입력 매개 변수 이름 (대/소문자 구분)을 올바르게 확인하는 것이 좋습니다. 언급 할 때 'cobrandLogin'과 cobrandPassword의 두 가지 매개 변수로 보내야합니다.

1

나는 Postman으로 API를 테스트하고 있으며 분명히 작동하게하려면 x-www-form-urlencoded과 매개 변수를 보내야합니다. 기본값 form-data을 사용하면 위에서 언급 한 오류가 발생합니다. 내 경우

enter image description here

1

,이 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