TokenSuite Docs
About tokenforgeBook a DEMO
  • Welcome
  • 🔧Configuration
    • Basic Config
      • Add administrator and enable 2FA
      • Change administrator default TokenSuite language
      • Channel settings
      • Upload favIcon
      • Configure countries, zones, currencies, locales
      • Legal documents
    • SmartContract configuration
      • Credentials for Chain Backend Service
      • Configure chain signer wallet and product.seller wallet
      • Deploy a SmartContract
      • Import SmartContract
    • Product configuration
      • Product attributes
    • Invoice configuration
      • Configure company details of an invoice template
      • Set invoice creation timing (after order or after payment)
      • Add invoice logo
    • 3rd party services
      • Email Configuration and Brevo templates
      • Configure stripe payment
      • Regulatory providers
        • NYALA Digital Asset AG
        • CONCEDUS GmbH
        • Tangany GmbH
        • IDnow GmbH
    • Dynamic settings
      • General settings
  • 🖥️How to
    • Menu structure explained
    • User management
      • How to manage and edit customer data
      • How to enable/ verify a new user/investor
      • Where to find the user wallet
    • Product management
      • How to add a new product (ERC-20 or ERC-1155)
      • How to add a new product (ERC-721)
      • How to check the inventory ot the product
      • How to change the price of a product
      • How to add documents to a product
      • Add more image files to a product and what implications it has
    • Order management
      • Where to find new orders
      • Status of the orders
      • How to set order to paid status
      • Where to find the transaction of an order
      • Instructions for Downloading an Invoice for an Order
    • Minting
      • How to mint ERC-721 edition
      • How to check the metadata of a token on IPFS
    • Affiliate Partner
  • 🔑Developer Guides
    • TokenForge API explained
      • TokenForge MediaService
        • API Create a bucket with CORS rules
        • API: Upload & download media files
      • TokenForge Core Backend
        • API: Register a Customer
        • API: Submission of a Product / Item (WIP/DRAFT!)
        • API: Obtain JWT / Sign In as a Customer
        • API: Prepare an Image for Uploading
        • API: Fetching Category-Tree (”Taxon”)
        • API Order Process (WIP Draft)
        • Principles of the API
  • Chain Backend API (swagger)
  • MediaService API (swagger)
  • Launchpad & Marketplace API (swagger)
  • GraphQL Playground
Powered by GitBook
On this page
  • Prerequisites
  • Variables
  • The request: obtain JWT
  • Good to know
  1. Developer Guides
  2. TokenForge API explained
  3. TokenForge Core Backend

API: Obtain JWT / Sign In as a Customer

PreviousAPI: Submission of a Product / Item (WIP/DRAFT!)NextAPI: Prepare an Image for Uploading

Last updated 1 year ago

Prerequisites

In order to perform the sign up of a customer, you should have read our introduction on how our API is built and what basic concepts have been applied:

Variables

Throughout our tutorials, we will use Variables which are also part of our Postman collections:

{{API_URL_SHOP}} : this covers the whole URL of the REST-API including the suffix for “shop”-related endpoints

The request: obtain JWT

Authorization
None

Method

POST

Endpoint

POST {{API_URL_SHOP}}/authentication-token

Request Body

Request Code (Success)

200

Response Body

{ "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ.....", "customer": "/api/v2/shop/customers/76" }

Error Response Codes

401 - Unauthorized

Restrictions:

  • Emails needs to be unique across the whole instance of your store or marketplace.

  • Certain validators are applied on $firstName and $lastName, which can be found here (TODO: link).

Good to know

The response of a successful authentication contains the JSON WebToken (JWT) and the associated CustomerIRI of the authenticated user. The JWT must be used for any further authentication for the API endpoints that require valid user authentication, while the customerIRI is for all Endpoints that require a reference to that particular user.

In case of any errors like invalid credentials, un-verified or locked user account or even when the user does not exists at all, a 401 unauthorized will be returned.

🔑
{
"email": "{{email}}",
"password": "{{password}}"
}
Principles of the API
TokenForge MediaService