PublicToken. For example, you can initiate email magic link and OAuth all via the SDK using PublicToken. This is also very useful for Web3 focused applications that might not want to implement their own backends to handle user verification using our secret ApiKey.
Setup
To load the MoonKey Javascript SDK directly, you can load MoonKey.js directly in your document header. If you prefer to use MoonKey.js as a module, we provide an npm package that allows you to load MoonKey JS SDK directly into your project’s npm pipeline. Refer to our GitHub repo here. To Get started with MoonKey JS, useMoonKey(publicToken, options) to create an instance of the MoonKey object. This will be your entrypoint to the rest of the MoonKey Javascript SDK. If you use React, refer to the React SDK Reference.
Your publicToken is required when calling this function since it identifies your App to MoonKey.
We will be prefilling example with a sample test PublicToken, pk_test_KJuRUZmh1XC342h1n39gH84MuSZDyD13NfhtDkaY6IfwpQA0H.
You should replace it with your own PublicToken under API Keys -> Public.
Methods
Publishable API Key that identifies your App.