Create a client for a tenant
A client represents an application or service that interacts with a tenant by making API requests. To enable this interaction, you need to create a client and assign it appropriate roles based on the capabilities it needs to access.
This can be achieved either via the MATTR Portal or by using the Management API.
- Open Platform Management in the left navigation panel and select Tenant.
The tenant management screen appears. - Click Create/Switch Tenant at the top-right.
The All Tenants window opens. - Click Switch next to the tenant created in the previous step.
- Under Platform Management, select Users, clients & roles.
- Go to the Clients tab and click Create new.
- Enter a name to identify the client in the Name field (e.g. Tutorial Issuer client).
- Select the required permissions in the Tenant access section.
- Click Create to create the client
- Make note of the displayed client credentials (
auth_url
,tenant_url
,client_id
andclient_secret
).
The client_secret
is only displayed immediately after the client is created.
Once you navigate away from this screen, the client secret will be masked and
cannot be retrieved again. Ensure you save it securely at this point.
Make a request of the following structure to create a new tenant client:
POST https://manage.au01.mattr.global/v1/tenants/{tenantId}/clients
tenantId
: Replace with theid
identifying the tenant, obtained from the previous step's response. This creates the client in the context of a specific tenant.
{
"name": "Tutorial Issuer client",
"roles": ["issuer"]
}
name
: Name of the client associated with this tenant.roles
: An array of roles assigned to this client based on the capabilities it needs to access. This example is assigning it the role of an Issuer.
Response
{
"clientId": "suC7I*******************************",
"clientSecret": "Qn_43J****************************************************",
"name": "Example client",
"permissions": ["permission_1", "permission_2", "permission_3"],
"roles": ["issuer"]
}
clientId
: Client identifier for retrieving a tenant access token.clientSecret
: Client secret for retrieving a tenant access token.name
: As provided in the request.permissions
: An array of permissions assigned to the client based on the definedroles
.roles
: As provided in the request.
How would you rate this page?