Messente avatar logo

Verification API Documentation

Verifying PIN Code

After starting authentication, you must verify the PIN code of the user.

Request URL

Request to register a service will be made to the following URL:


Where {ServiceID} in the URL will be replaced with your ServiceID and {UserID} will be replaced with UserID of the user.

Request headers
HTTP headerDescriptionRequired
X-Service-AuthRefer to authentication section on how to authenticate your API calls with Messente API username and passwordYes
Request body (JSON encoded)
methodtotp - Prefer TOTP verification with Verigator App. In case app is not set up for this user, Verigator will fallback to SMS automatically.
sms - Start SMS-based authentication
tokenPIN code entered by the User Yes
auth_idVerification ID in case SMS-based authentication was usedSMS based method only
Response body (JSON encoded)
methodtotp - TOTP authentication method was used
sms - SMS-based authentication was initiated
verifiedtrue - Verification was successful, allow user to log in
false - Verification failed, deny access for this user
HTTP Response Codes
STATUS codeValueDescription
200OKRequest was successful
401Authentication required
Missing authentication headers (X-Service-Auth)
403ForbiddenForbidden request
404Not foundVerifitacion with auth_id was not found
422Invalid dataInvlalid request body - check the format and if it was correctly JSON encoded


from messente.verigator.api import Api

# Initialize API
api = Api("messente-api-username", "messente-api-password")

# Create your service
service ="my-service-id")

# Initialize user
user = api.users.get(, "verigator-user-id")

# Start authentication
api.auth.initiate(,, api.auth.METHOD_TOTP)

# Verify token
verified, error = api.auth.verify(,, token)

public static final String API_USERNAME = "";
public static final String API_PASSWORD = "";
public static final String VERIGATOR_SERVICE_ID = "";

// Initialize the Verigator API with your Messente API credentials
Verigator verigator = new Verigator(API_USERNAME, API_PASSWORD);

// After creating the service, for all future requests you get Service instance like this:
service = Service.get(verigator, VERIGATOR_SERVICE_ID);

// Now you can start syncing your service's users to Verigator
User user = service.registerUser("", "+3725555555");

// You can use SMS or TOTP (verification via Verigator app)

VerificationResponse verificationResponse = user.verifyPin("123456");

if (verificationResponse.isVerified()) {
  System.out.println("Verification successful!");
} else {
  System.out.println("Verification FAILED!");