Skip to content
Mint Service Desk Documentation centre

Creating A Request

Obtain an API access token with client credentials, then use it to test a ticket request in Swagger or Postman.

Creating the API client

To create a query you first need to prepare a client. To do this, press button.

The client authenticates machine-to-machine requests using client_id and client_secret.

  • Client id (Remember not to use spaces between words but use e.g.‘_’)
  • Client name
  • Allowed scopes (We will focus on two scopes: mint.api_assets and mint_api.tickets)

Scopes determine which API operations the generated token can access.

After adding the scopes and pressing button, a Client secret is generated which needs to be copied and saved. Remember that when the secret is generated again, the secret will no longer be valid.

Obtaining a token

To obtain a token in Postman, create a request using POST. Enter your Mint address followed by ‘/connect/token’, for example https://rcmintsd.opgksoftware.com/connect/token.

Now you need to configure four fields:

  • grant_type: enter client_credentials.
  • client_id: enter the client_id used in the API configuration.
  • client_secret: enter the secret generated for the API client.
  • scope: enter the scopes assigned to the API client.

Remember to do this in ‘x-www-form-urlencoded’.

Now press the ‘Send’ button to receive the token.

Testing a request

Copy the token received and you can test it on your_address_to_mint/swagger/index.html

To start testing first press button. In the field that appears, type ‘Bearer your_token’

Then press button again.

Now you can test if the token works. Go below to the ‘Tickets’ section and select ‘/api/Tickets/{ticketId}’. You will see the example that will be returned after testing. Press button. Fill in the ‘ticketid’ field by typing the id of the ticket you want to preview. Then press Execute button.

You don’t have to test it on swagger. You can do the same in Postman by selecting the GET method and typing ‘page_address/api/Tickets/{ticketId}’ Example: https://rcmintsd.opgksoftware.com/api/Tickets/{ticketId}.