Salla Docs
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Auth
  • Overview
  • Languages
  • Notify
  • Event
  • Storage
  • Configuration
  • Forms
  • Helpers
  • Auth
    • Login
    • Logout
    • Verify
    • Resend
    • Register
    • Refresh
  • Cart
    • Latest
    • Details
    • Quick Add
    • Add Item
    • Delete Item
    • Delete Image
    • Add Coupon
    • Remove Coupon
    • Get Upload Image
    • Get Quick Order Settings
    • Create Quick Order
    • Order Status
    • Get Current Cart Id
    • Price Quote
  • Wishlist
    • Add
    • Remove
    • Toggle
  • Loyalty
    • Get Program
    • Exchange
    • Reset
  • Comment
    • Add Comment
    • Fetch
    • Get Page Comments
    • Get Product Comments
  • Profile
    • Update profile
    • Update contact
  • Product
    • Get price
    • Product availability
    • Categories
    • Offer details
    • Search products
    • Get Gift Details
    • Add Gift To Cart
    • Upload Gift Image
    • Get Product Details
    • Fetch
    • Fetch Options
    • Size Guides
  • Order
    • Create cart from order
    • Cancel
    • Send invoice
    • Show order
  • Booking
    • Add
  • Rating
    • Order
    • Store
    • Products
    • Shipping
  • Currency
    • Change
    • List
  • Component
    • Reviews
    • Menus
  1. Auth

Verify

This endpoint handles the customer's access code verification. It sends the entered access code to the backend and waits for the response. In the case of receiving a positive response, it helps by directing the customer to the store's home page. Otherwise, if the verification process fails, it informs the customer to re-send the correct access code.
TIP
The verify endpoint has been implemented in the Login Web Component, and It's all setup to save developer's time and effort.

Payload#

VerifyByMobilePayload
type
enum<string> 
optional
The veification method.
Allowed values:
emailmobile
data
object 
optional
code
string 
optional
The access code received by the customer.
phone
string 
optional
The customer phone number.
email
string 
optional
The customer email.
country_code
string 
optional
The customer country code.
supportWebAuth
boolean 
optional
Is Web Auth supported?

Response#

Success
Error
auth.verify.success
success
boolean 
success
required
Response flag
status
enum<number> 
status
required
Allowed values:
200201202
data
object 
data
optional
Response data.
case
enum<string> 
required
Rather than using a null-test to check if the access token has been set, the case value may be checked. When there is no token returned, its value will be new_customer. This indicates that the user is a new customer and must go through the registration process. On the other hand, its value will be authenticated when a token is returned. This indicates that the user has been authorized and is ready to log in.
Allowed values:
new_customerauthenticated
redirect_url
string 
required
The destination page URL that will be used when the user is granted authorization.
token
string 
required
Users are authenticated using Access Tokens, which are short-lived tokens.
verification
object 
required
The access verification type and status.

Usage#

The verify() passes the customer access code to the backend in order to proceed with the verification process. In the case of using the phone number method to receive the access code, this method will pass the received access code along with the customer's phone number and the country code.
Mobile
Email

Events#

This endpoint may trigger two events, the onVerified and onVerificationFailed events.

onVerified#

This event is triggered when the verification process is done without having any errors back from the backend.

onVerificationFailed#

This event may happen when there is an issue with setting the verification type, by phone or email. Additionally, this event will be triggered when the verification process fails and the backend sends error codes. In other words, the received response status is not 200.
Modified at 2025-03-04 12:54:02
Previous
Logout
Next
Resend