Use Protico APIs

To maintain Protico's efficiency without sacrificing its decentralized spirit, the SDK uses a hybrid method that incorporates both centralized and decentralized storage technologies. As decentralized data storage technologies continue to improve, we will integrate more of them into our infrastructure.

To use our APIs you'll need to get a Protico API Key!

Initialize Protico API

const proticoAPI = new ProticoAPI(API_KEY);

Get your users' access token

Use your Web3 ProvidersproticoAuth object to obtain your users' access token, and pass it to the ProticoAPI instance. This will manage your users authentication on our backend.

try {
    ...
    const authToken = proticoAuth.getWeb3AuthToken();
    proticoAPI.setAuthToken(authToken);
}
...

Revoke access on logout

When the user logout, revoke the authToken as follow:

 proticoAPI.clearAuthToken();

Last updated