【问题标题】:Clarifai client asking for client secret and idClarifai 客户要求提供客户密码和 ID
【发布时间】:2017-11-09 11:06:40
【问题描述】:

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

// 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

【问题讨论】:

    标签: javascript authentication clarifai


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2021-08-07
      • 1970-01-01
      • 1970-01-01
      • 2015-01-06
      • 2018-04-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多