2017-06-01 8 views
1

IBM Watson会話アプリケーションに問題があります。IBM Watson会話 - node.jsをワトソン会話に接続できません

私のアプリケーションをセットアップして、node.jsアプリケーションに接続しようとしました。私はここでこのチュートリアルに従っています: https://github.com/watson-developer-cloud/node-sdk#conversation と私はapi ibmが提供する公式のnode.jsを使用しています。

残念ながら、それはうまくいかず、次のエラーが発生します。

{ Error: Not Authorized 
    at Request._callback (/Volumes/hd2/Projekte/vi-com-bot-service/node_modules/watson-developer-cloud/lib/requestwrapper.js:87:15) 
    at Request.self.callback (/Volumes/hd2/Projekte/vi-com-bot-service/node_modules/watson-developer-cloud/node_modules/request/request.js:188:22) 
    at emitTwo (events.js:106:13) 
    at Request.emit (events.js:191:7) 
    at Request.<anonymous> (/Volumes/hd2/Projekte/vi-com-bot-service/node_modules/watson-developer-cloud/node_modules/request/request.js:1171:10) 
    at emitOne (events.js:96:13) 
    at Request.emit (events.js:188:7) 
    at IncomingMessage.<anonymous> (/Volumes/hd2/Projekte/vi-com-bot-service/node_modules/watson-developer-cloud/node_modules/request/request.js:1091:12) 
    at IncomingMessage.g (events.js:291:16) 
    at emitNone (events.js:91:20) 
    code: 401, 
    error: 'Not Authorized', 
    description: '2017-06-01T08:57:57-04:00, Error ERCDPLTFRM-DNLKUPERR occurred when accessing https://gateway.watsonplatform.net/conversation/api/v1/workspaces/dc8097e8-fea7-47a3-80ed-57c43321377e/message?version=2017-04-21, Tran-Id: gateway-dp01-2475007148 - Invalid UserId and/or Password. Please confirm that your credentials match the end-point you are trying to access. A common error is trying to use credentials from an experimental or beta release against a GA release or vice versa' } 

私が提供する資格情報は正しいです。

あなたはアイ・アイデアを持っていますか?私はうまくいかないのですか? ベスト、ベン

+0

あなたはどのBluemix地域にいますか?こちらを参照してくださいhttps://stackoverflow.com/questions/44249910/how-do-i-use-a-watson-conversation-service-in-frankfurt-using-node-red-or-the-no –

+0

多分それはより良い使用始めるのが簡単な会話。 https://github.com/watson-developer-cloud/conversation-simple。 nodejも使います。 – barbs

+0

あなたは使用しているバージョンについて確かですか?バージョンは使用している資格情報と互換性がありますか? –

答えて

2

Bluemixには、サービスをホストできる地域がいくつかあります。各地域には異なるゲートウェイがあります。デフォルトではhttps://gateway.watsonplatform.netです。

あなたがコードに次のURL変数を設定しますドイツ+フランス地方の場合:

url: 'https://gateway-fra.watsonplatform.net/conversation/api/' 

ので、同じように:他の地域については

var conversation = new ConversationV1({ 
    username: '<username>', 
    password: '<password>', 
    url: 'https://gateway-fra.watsonplatform.net/conversation/api/', 
    version_date: ConversationV1.VERSION_DATE_2017_05_26 
}); 

、あなたはワトソン会話サービスの資格情報に行くことができますURLを表示します。または、会話ワークスペースを「展開」してから「資格情報」セクションに移動します。

関連する問題