Clarifai 客户要求提供客户机密和 ID

Clarifai client asking for client secret and id

我正在像这样设置我的初始 js 文件,但是在构建时我收到一个错误,客户端现在需要我的客户端密码和客户端 ID .. 奇怪的是,当我第一次构建我的应用程序时,所有初始 API 请求仅通过 api 键。我可以在 clarifai 预览 UI 上看到我上传的 + 训练图片,所以我知道它们已成功完成。从那以后每次通话都失败了。不确定我从哪里获得客户端密码和 ID,因为文档只为我提供了一个 api 密钥。

// Require the client
const config   = require('../config/config');
const Clarifai = require('../../node_modules/clarifai/src');

// initialize with your api key. This will also work in your browser via http://browserify.org/
const app = new Clarifai.App({
  apiKey: config['CLARAFAI_API_KEY']
});

如网站所述...

After creating your API Key, you are ready to make API calls. If you are using a client, authentication will be handled for you. If you are using the REST API, you will need to add the Authorization header as described in the cURL example.

编辑 2017 年 7 月 27 日: Screenshot of error msg

正如您在他们的 authentication post 上看到的那样。他们已弃用 client/id 和 secret 并从 2017 年 11 月 15 日起将其删除。 我认为你应该更新你的 js 包。 它会很好地工作。