Breinify’s React API library provides hooks, components, and type definitions to call Breinify’s API.
You need a valid API-key, which you can get for free at https://www.breinify.ai . In the examples, we assume you have the following API key:
It is recommended to use signed messages when utilizing the react library. A signed messages ensures, that the request is authorized. To activate signed message ensure that Verification Signature
is enabled for your key (see Breinify’s API Docs for further information). In this documentation we assume that the following secret is attached to the API key and used to sign a message.
The library is available on npm and can be added using:
npm i breinify-react
Whenever the library is used, it needs to be configured, i.e., the configuration defines which API key and which secret (if signed messages are enabled, i.e., Verification Signature
is checked) to use. Please place BreinifySetup
on the top most section of your application.
Warning: Only call BreinSetup once in your application!
import { BreinifySetup } from 'breinify-react';
const apiKey = '938D-3120-64DD-413F-BB55-6573-90CE-473A';
const secret = 'utakxp7sm6weo5gvk7cytw==';
BreinifySetup({ apiKey, secret });
Note: API Key and Secret should not be shown publicly
To understand all the capabilities of Breinify’s API, you can find further information here: