Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Status
colourGreen
title3.13.0

The Create JWT REST API is used to create a JSON Web Token (JWT) used to access the ServiceMobility system. JWTs are used for all authentication and authorization throughout the system including; access from the mobile application, web management console access, REST API access.

(info) ServiceMobility's authentication and authorization system can operate in one of two ways:

 



Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

On this page:

Table of Contents
maxLevel21

Related pages:



Excerpt

Resource URL Summary

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

Description

POST /createjwt

Supported HTTP Methods

MethodDescription
POST

If the credentials passed in are verified, then this API will return a valid JWT that can then be used to access other REST APIs.

HTTP Headers

HTTP HeaderValue
Content-Typeapplication/json

HTTP Body

This REST API only support the JSON body format.

Code Block
languagejs
titleJSON Format
{
    "username":"",
    "password":""
}

Body Properties

PropertyDescription
usernameA valid user name requesting a JWT
passwordA valid password associated with the above username

HTTP Response

Response Codes

HTTP CodeDescription
200OK. Credentials were verified and a valid JWT was returned.
401Invalid Logon.
500Server error. An error occurred while processing the request. The HTTP response body should have more details as to the possible cause.

Response Body on Success

Code Block
languagejs
{
  "token": ""
}

The token property, in the returned response should be used for all subsequent REST API calls.