Search code examples
javascriptauthenticationclarifai

Clarifai client asking for client secret and id


I'm setup my initial js file like so however on build I'm getting an error that the client now requires my client secret and client id .. What's weird is that when I first built my app all initial API requests went through with just the api key. I can see my uploaded + training pictures on the clarifai preview UI so I know they completed successfully. Every call since then has failed though. Not sure where I get the client secret and id since the documentation only provides me with an api key.

// 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']
});

As stated on the website...

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.

EDIT 7/27/2017: Screenshot of error msg


Solution

  • As you can see on their authentication post. They have deprecated the client/id and secret and remove them from Nov 15, 2017. I think you should update your js package. It will just work fine.