Avaturn Developer API
What can you do using API?
- Integrate Avaturn skipping Avaturn's sign in page thus enabling you to use your own authentication method for the users.
- Fine tune the user flow of Avaturn to match your app. E.g. have a button inside of your app that opens specific avatar.
- Upload selfies directly instead of having people to scan using Avaturn UI.
web SDKto implement custom UI or receive callbacks on events.
- [Soon] Render user avatar as image for e.g. profile picture.
To get access to Avaturn API first you need to create a project at developer portal and generate an API authentication token.
Avaturn API is only available in a paid package and is not available on free plan. You can upgrade your plan at developer portal.
API is built around following concepts:
- Project -- Entity having unique domain and access token assigned to it. Usually
<your-app-name>.avaturn.dev. Currently can be created by contacting avaturn support.
- User -- Anonymous user that can be created with API, assigned to (owned by) Project, developers can access only to users owned by their project.
- Avatar -- 3D model that can be exported. Created and customized by User during Session
- Session -- Entity representing single User interaction with avaturn UI resulting an export
When you need to allow user to perform actions with their avatar in avaturn UI you need to create new session, send resulting session url to your front-end and open it in webview.
There are 3 different session types.
create_or_edit_existing-- opens avatar management screen, where user can choose either to create new avatar or open existing in editor. The session drops into avatar creation flow automatically if user haven't created any yet.
edit_existing-- opens given avatar's editor
create-- opens avatar creation flow. Optionally allows developer to make their own scanning and upload process and skip related avaturn screens.