Back

Authentication in MTM

This page helps you in obtaining OAuth access credentials, using the MTM Connect REST API, and trying out API functions using Swagger.

OAuth is the method used by MTM Connect to authenticate users. OAuth protects user credentials while enabling secure resource retrieval. OAuth is an authorization standard that outlines methods (a process) for obtaining scoped access to a protected resource. The aforementioned can be accomplished in a variety of methods that are specified in this standard. The OAuth terminology for this is flows. The client credential flow is the most popular method for gaining access to an API.

According to this flow, three actors are involved while accessing a server's protected resource.

  1. Resource server – Server hosting the protected resource. MTM Connect is our resource server.
  2. Authorization server – Server that authenticates the client request. Our authorization server is BlueNext.
  3. Resource owner – Client or the user who is trying to gain access.

The flow is as follows:

The following are the steps involved in Oauth:

Step 1. The initial step in registering for MTM Connect is to provide the new organization with the Client ID, Client Secret, Scope, Grant Type, and BlueNext token URL. BlueNext is the authorization server for the client request. Each parameter's description may be found below.

ParameterDescription
client_idThe client id for the application that is getting registered.
client_secretThe client secret for the application that is getting registered.
scopeScopes that are granted to the access token
grant_typeThis mentions the flow being used and should be always mentioned as client_credentials
BlueNext token URLThe BlueNext token URL for the application that is getting registered. Access token is automatically generated from the BlueNext token URL.

Enter these parameters into an authorization tool like Postman to produce a one-time use token known as an access token.

After selecting the environment quick look, click on the edit to enter the ClientID, ClientSecret, Scope, GrantType and BlueNext token URL (BNTokenURL) values in the 'current value' column.

Step 2. After successful authentication, the postman generates an access token.

Step 3. The client can copy and send this token along with the request to the resource server. The MTM Connect is the resource server, and Swagger may be used to access it. MTM provides a unique Swagger environment to each client that will utilize the MTM Connect API Swagger link, which would be https://-api-mtm.blueja.io/swagger/index.html. The agreed-upon and registered-for endpoints are contained in this swagger link.

On the Swagger website, click the Authorize button. After you click the Authorize button, a dialogue box will appear for you to enter the access token. While pasting the value into the text box, use the standard Bearer <space><access_token> format. After providing the value, choose Authorize and then Close.

Step 4. The resource server gets this token from the request and validates the same with the authorization service.

Step 5. After entering your authorization token, select any endpoint and click the Try it out option.

Fill in the necessary information and click Execute to see the results. The resource server gives the client the requested resource after a successful validation.

NOTE

The client can try this out using the MTM Connect API sample application. The sample client app in C# can be found here - GITHub - explorance/exploranceapis-mtmconnect-csharp.

Related Articles

InMTM Connect APIs

InMTM Connect IN API

InMTM Connect OUT API

Back to top

Copyright © 2025

Explorance Inc. All rights reserved.