Ask AI

Using Unidy REST API

Unidy exposes a RESTful API accepting and responding in JSON format.

API Endpoints

Each Unidy tenant comes with it’s own API documentation that offers the possibility to try out calls by providing the client ID and secret. The documentation can be found at https://<TENANT>.unidy.de/api-docs.

Β 

API Authentication

In order to use the Unidy API, an access token send via authorization header is required. There are two ways to create an access token:

Authorization Code

In this process the user has to login to generate a code. This code has to be exchanged for an access_token. It can be used to make calls on behalf of the user. The API access is limited to those usecases:

  • Read the users profile
  • Manage the users tickets and subscriptions

If you want to make those API calls from the client side (app or browser), then you should choose this flow:

If you have a Backend available you can use this flow:

Client Credentials

πŸ‘ Recommended if you have access to an backend application.

Use the OIDC Client Credential Flow to generate an admin access token that can access all endpoints and data.

This is an example on how the access token needs to be included in your API calls.

curl -X 'POST' \
'https://<TENANT>.unidy.de/api/v1/users' \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer <ACCESS_TOKEN>' \
-d '{ email: undiy@example.com }'
Β 
Did this answer your question?
😞
😐
🀩