Get Okto API Key and Setup

In this part we will integrate Okto Wallet in React Native/Flutter whether it's for your existing app or a new one, but before you can start using the SDK, you will need an API key to get started.

🔑

Request an API key from here (opens in a new tab).

Installing

Add the SDK to your app using your preferred package manager.

bash
pnpm i okto-sdk-react-native @react-native-async-storage/async-storage axios react-native-webview

Initialize the SDK

You need to first intialize the SDK with the API key to get started. You can do this in the root file of your app, for example App.tsx or index.tsx.

App.tsx
import { OktoProvider, BuildType } from 'okto-sdk-react-native';
 
<OktoProvider apiKey={OKTO_CLIENT_API} buildType={BuildType.SANDBOX}>
    <App />
</OktoProvider>

And we are done🎉! You are now ready to use the SDK in your app.