User will access your game from within Komoverse website
Komoverse website will check if user logged in or not
If user not logged in, Game URL will be accessed via iframe without authorization token for example https://yourgameurl.com/index.html
If user logged in, Game URL will be accessed via iframe with given authorization token for example https://yourgameurl.com/index.html?token=eyxxx......xxxx
You can use the token given in URL parameter to make Authorized Player API calls
Please note that token have expiry time. Don't forget to refresh the token.
{"status":"error","messages": {"unauthorizedLogin":"The username or password is incorrect." }}
{"status":"error","messages": {"incorrectPassword":"The password you have entered is not correct." }}
Authenticating Using Third Party Providers
Login with Google or Facebook Single Sign-On
POST[endpoint]/v3/single-sign-on
If your game have integrated Google / Facebook SSO, you can send SSO access token to this API. If the email associated with SSO account already registered on a KOMO Account, we will send you our access token to be used in game.
{"status":"error","messages":"Linked KOMO Account Not Found for This Game"}
Managing KOMO Access Token
Check Token Validity
GET[endpoint]/v3/token/check
Headers
{"status":"success","message":"Token is valid!","expires_at": {"unix":1685524564,"utc":"2023-05-31 09:16:04" }}
{"status":"error","messages":"Unauthenticated."}
Refresh Token
GET[endpoint]/v3/token/refresh
Renew token expiry time by refreshing the token. New access token will be provided and further request should use new access token instead of old access token.
{"status":"error","messages": {"tokenRequired":"A login token is required to perform this request." }}
{"status":"error","messages": { "apiKeyRequired": "An API key is required to perform this request. If you wish to use the KOMO API in your application, contact the Komoverse team to reach out for an agreement."
}}
Using the KOMO Account
Get Account Information from Authentication Header
{"status":"error","message": {"token": ["The token field is required." ] }}
{"status":"error","messages": { "apiKeyRequired": "An API key is required to perform this request. If you wish to use the KOMO API in your application, contact the Komoverse team to reach out for an agreement."
}}
{"status":"error","messages": {"tokenRequired":"A login token is required to perform this request." }}
Find Other User's KOMO Account
POST[endpoint]/v3/account/find
Find Other KOMO Account by its user ID, KOMO username, game display name, or wallet address