# Authentication

The anybill SDK supports three different methods of authentication. Fist by letting the user create or use his own anybill account with E-Mail or Password, second create an anonymous account over the SDK or last create an anybill user account over the partner platform API, link it to your user account and then use token to initialize the SDK.

# 1. Login/Register anybill user account

Let your users create and use real anybill user accounts. Here the user knows that he has an anybill user account and is able to login with it in the SDK or also the anybill App.

# Flow: let a user login with his anybill account

anybill SDK auth login

# 2. Anonymous user account

By using this functionality the SDK creates a anonymous user account in the background with no email or password. With this authentication method the App user can use the anybill services as if he had no user account. The anonymous user account can be converted to a normal anybill account with email and password later on.


After a App with a anonymous account gets deleted, it cannot be restored because there is no reference to the old account left. If you want an anonymous background user account which is linked to your App user account and you can continue to use after the deletion of the App please have a look at Linked user account.

# 3. Linked user account

If your App has an own user account system you can link a anybill user to your user account by using the anybill partner platform API. With this API you can create anybill user accounts and link them to your user account by saving the anybill user id. By knowing the anybill user id you can create access tokens for using the anybill App API. With this access token you can either use the App Api directly or initialize the SDK to automatically communicate with the anybill App API.

# Flow: init the SDK with a linked user token

anybill SDK auth token

# Flow: set a new token to the SDK after refreshing the previous token failed in the SDK

anybill SDK auth token refresh