Skip to content

Breinify/brein-api-library-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a5e86b2 · Aug 26, 2022

History

26 Commits
Jul 8, 2022
Aug 26, 2022
Aug 3, 2022
Aug 26, 2022
Jul 8, 2022
Jul 8, 2022
Jul 20, 2022
Jul 12, 2022
Jul 8, 2022
Jun 3, 2022
Aug 26, 2022
Jul 20, 2022
Jul 14, 2022
Jul 8, 2022
Aug 26, 2022
Aug 26, 2022
Aug 26, 2022
Aug 26, 2022

Repository files navigation

Breinify API JavaScript Library

Breinify’s React API Library

Overview

Breinify’s React API library provides hooks, components, and type definitions to call Breinify’s API.

Getting Started

Retrieving an API-Key

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:

938D-3120-64DD-413F-BB55-6573-90CE-473A

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.

utakxp7sm6weo5gvk7cytw==

Installing

The library is available on npm and can be added using:

npm i breinify-react

Configuring the Library

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

API

Further Links

To understand all the capabilities of Breinify’s API, you can find further information here: