https://api.token2.com/createuser?api
=[api_key]&phone
=[mobile_phone]&type
=[authentication type]&pin
=[pin code]&format
=[response format]
api
- the API key for the website. Can be obtained by clicking on the site's name in the control panel phone
- the mobile phone number of the user in e.164 format. This number will be used to send OTP by SMS and to reset access for mobile application users email
- User's email address type
- Authentication type to be used. Following values are possible: 0 - mobile application only (default), 1 - SMS based , 2 - email based (for testing purposes only, not recommended for production use) pin
- PIN code, required for mobile application users (can be set to a random 4 digit value for SMS based authentication type) format
- format of the response data. Values: 1- json, 2- xml, 3- simplified plain text (true or false, no details or description), 0- serialized data (default) response
- result's description (e.g. "user created")userid
- user's unique ID. This ID will need to be stored and associated with your local user database. User ID is required to validate/generate/send OTP codessuccess
- returns "true" if the user was successfully created and assigned a unique Token2 IDhash
- User's secret key to be added to the Token2 Mobile Application hashqr
- QR Code image URL of user's secret key to be scanned using Token2 Mobile Application https://api.token2.com/validate?api
=[api key]&token
=[token]&userid
=[User's Token2 ID]&format
=[response format]
api
- the API key for the website. Can be obtained by clicking on the site's name in the control paneluserid
- User's Token2 ID.token
- OTP to be verifiedformat
- format of the response data. Values: 1- json, 2- xml, 3- simplified plain text (true or false, no details or description), 0- serialized data (default) response
- result's description in English (e.g. "OTP generated and sent by SMS")userid
- User's Token2 IDsiteid
- Site IDvalidation
- returns "true" if OTP provided via API is valid, or "false" if not valid. Use this value to check if user should be authenticated.https://api.token2.com/send?api
=[api key]&userid
=[User's Token2 ID]
api
- the API key for the website. Can be obtained by clicking on the site's name in the control panel userid
- User's Token2 ID.response
- result's description in English (e.g. "OTP generated and sent by SMS")userid
- User's Token2 IDsiteid
- Site IDsuccess
- returns "true" if OTP was successfully generated and sent