Getting Started

Get started with just a few lines of code. Something missing, confusing, or needs updating? Make suggestions here: support@simpleid.xyz

SimpleID currently does not support Safari or native mobile apps

Install the SDK

SimpleID is available in a Javascript SDK. It can be installed through npm like so:

npm install simpleid-js-sdk

SimpleID is currently in beta release, so there may be bugs. These bugs should not impact your app.

Before moving on, make sure you have signed up and created a new project (app) here.

Once installed, you'll need to instantiate SimpleID in your app. That's as simple as dropping the following code in:

import SimpleID from 'simpleid-js-sdk';
const simple = new SimpleID({
appOrigin: window.location.origin,
appName: "App Name",
appId: "YOUR-APP-ID",
useSimpledIdWidget: true,
network: 'mainnet'
});

The parameters you pass into the SimpleID class are as follows:

Parameter

Purpose

appOrigin

Tells us your application's URL

appName

Tells us your application's name

appId

Unique identifier for your project. You will get your appId after you've signed up for SimpleID here and created your first project.

useSimpledIdWidget

If true, will build a notifications widget and display the right notifications for the right users. If false, will return notification data so you can design your own way of showing the available notifications.

network

The ethereum network you are exposing to your users. This can be updated after instantiation

Using SimpleID With Wallet Providers

SimpleID supports any wallet provider, you will simply need to make sure you pass through, at very least, their wallet address, but you can pass through their email as well. Here's how:

const userInfo = {
email,
address,
provider
}
simple.passUserInfo(userInfo);

The parameters you pass into this method are defined as follows:

Parameter

Required

Purpose

email

No

If the email is available, it will be passed into our disassociation service and can be used for email communication through the SimpleID platform.

address

Yes

This is the user's wallet address.

provider

No

This is the wallet provider the user is using. This parameter can help with segmenting users in the future.

The simple.passUserInfo() method should be called when a user first visits and signs into your application.

Full SimpleID API

Method

Parameters

Purpose

Result

passUserInfo()

email, address, provider[Object]

Allows the necessary information for the SimpleID platform to be passed through for users not using the SimpleID wallet

User session returned

signOut()

None

Signs a user out, clearing session data.

Removes all session data

notifications

None

Returns available notifications for a user if you are not using the pre-built SimpleID notifications widget

Available notifications

More Documentation Coming

In the meantime, if there's something you're curious about, don't hesitate to reach out to us via email, Discord, or Telegram.