Login Customer

Using the passcode from /users/{userId}/send-passcode, authenticates a user for the system and retrieve a Customer Token.

/users/{userId}/passcode-login

POST https://apis.sandbox.flexshopper.com/v3/users/{userId}/passcode-login

This endpoint allows you to authenticate an user using a passcode.

Path Parameters

NameTypeDescription

userId

string

User's Id

Headers

NameTypeDescription

Authorization

string

Authorization token

Request Body

NameTypeDescription

passcode

string

The customer's passcode generated in the send-passcodeendpoint.

{
  "data": {
    "token": "\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1YTk..."
  }
}

Response Parameters

A successful request returns the HTTP 200 OK status code and a JSON response body that shows the customer token ready to be used.

Key

Type

Description

token

String

The Customer Token ready to be used; should be set to the Customer-Token header in subsequent API requests.

Last updated