EntityUser

Generate JWT Token

POST
Generate a JWT token for an entity user with the given options. This token can be used to authenticate the entity and entity user in the Mercoa API and iFrame.

Path parameters

entityIdstringRequired
userIdstringRequired

Request

This endpoint expects an object.
expiresIn
stringOptional
Expressed in seconds or a string describing a time span. The default is 1h.
invoice
objectOptional
pages
objectOptional
style
objectOptional
vendors
objectOptional
entity
objectOptional

Response

This endpoint returns a string
POST
1curl -X POST https://api.mercoa.com/entity/ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced/user/user_a0f6ea94-0761-4a5e-a416-3c453cb7eced/token \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "expiresIn": "1h"
6}'
200Successful
1"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MTIzNDU2Nzg5LCJuYW1lIjoiSm9zZXBoIn0.OpOSSw7e485LOP5PrzScxHb7SR6sAOMRckfFwi4rp7o"