Document toolboxDocument toolbox

Developer JWT REST API

3.18.0

The Developer JWT REST API is used to generate JWTs that can be used for accessing REST APIs. Each developer token has its own expiration date and set of permissions. This allows very fine grained access control and logging across all REST APIs. Please read this section carefully as there are many nuances as to how developer JWTs work. 

Changing a Developer JWT

Once a Developer JWT is created it becomes immutable, meaning nothing is allowed to change. Calling PUT on an existing developer JWT will cause the current JWT to be immediately blacklisted and a new JWT will be returned.

Blacklisting a Developer JWT

A developer JWT can be disabled (blacklisted) prior it its expiration date by using the blacklist URL. Once a developer JWT is blacklisted it immediately becomes invalid and can not be reenabled (whitelisted). A new JWT for the developer can be generated by executing another PUT request against the developer ID. 

Deleting a developer ID will cause its JWT to be immediately blacklisted.

On this page:

Related pages:

Resource URL Summary

Retrieve a list of all active developer tokens

GET /seiapi/v3/DeveloperToken

Retrieve the details of a specific developer token

GET /seiapi/v3/DeveloperToken/${DeveloperTokenID}

Generate a new developer token for a specific ID

PUT /seiapi/v3/DeveloperToken/${DeveloperTokenID}

Delete a specific developer token

DELETE /seiapi/v3/DeveloperToken/${DeveloperTokenID}

Blacklist a specific developer token

PUT /seiapi/v3/DeveloperToken/${DeveloperTokenID}/blacklist

API Specific Parameters

ParameterDescription

${DeveloperTokenID}

Identifies the Developer Token.

HTTP Headers

This API uses the default ServiceMobility HTTP Headers.



API Specifics

Retrieve a list of all active developer tokens

This REST API will return a list of all Developer Tokens that exist in the system.

URL

GET /seiapi/v3/DeveloperToken

HTTP Request Body

This request does not require a request body. 

HTTP Response

On success, an HTTP status of 200 will be returned, and the response body will contain a collection of Developer Token objects.

(warning) It is possible for the returned collection to be empty if the system does not have any Developer Tokens. 

HTTP Response Body
[
	{
		// Developer Token Object
	},
	{
		// Developer Token Object
	},
	{
		// etc., as required
	}
]

Otherwise, on error, the API returns the standard response object.

Retrieve the details of a specific Developer Token

This REST API will return a Developer Token with the specified ID. The Developer Token with the specified ID must already exist in the system.

URL

GET /seiapi/v3/DeveloperToken/${DeveloperTokenID}

HTTP Request Body

This request does not require a request body. 

HTTP Response Body

On success, an HTTP response code of 200 will be returned, and the response body will contain an Developer Token Object.

JSON Format
 {
	"Active" : true,
	"Email" : "",
	"ID" : "",
    "JWT" : "",
	"Name" : "",
    "Notes" : "",
	"Permissions": []
}

Otherwise, on error, the API returns the standard response object.

Generate a new developer token for a specific ID

This REST API will generate a new Developer Token with the specified ID into the system, if a Developer Token with the specified ID does not already exist in the system.

If, however, the Developer Token with the specified ID does already exist in the system, then this REST API will replace the already existing Developer Token with the specified ID with the details of the Developer Token supplied in the HTTP Request Body.

Once a Developer JWT is created it becomes immutable, meaning nothing is allowed to change. Calling PUT on an existing developer JWT will cause the current JWT to be immediately blacklisted and a new JWT will be returned.

URL

PUT /seiapi/v3/DeveloperToken/${DeveloperTokenID}

HTTP Request Body

The HTTP request body must contain a valid Developer Token Object.

HTTP Response

The API returns the standard response object on both success and error.

Delete a specific Developer Token

This REST API will delete a Developer Token with the specified ID from the system. The Developer Token with the specified ID must already exist in the system.

URL

DELETE /seiapi/v3/DeveloperToken/${DeveloperTokenID}

HTTP Request Body

This request does not require a request body.

HTTP Response

The API returns the standard response object on both success and error.

Blacklist a specific Developer Token

This REST API will blacklist a Developer Token with the specified ID from the system. The Developer Token with the specified ID must already exist in the system. Once a developer JWT is blacklisted it immediately becomes invalid and can not be reenabled (whitelisted).

URL

PUT /seiapi/v3/DeveloperToken/${DeveloperTokenID}/blacklist

HTTP Request Body

This request does not require a request body.

HTTP Response

The API returns the standard response object on both success and error.