The trial customers have access to a limited inventory comprising of free fonts. Hence, for authorization, trial customers will be integrated with client credentials OAuth flow (for validating the application).
Authorization
Obtain the application Client ID and Client Secret from your sales representative or partner contact at Monotype.
Use the Client ID and Client Secret to get an Authorization Bearer Token, using the client credentials flow. For example, the token could be generated using below curl command.
curl --location 'https://api.monotype.com/v2/oauth/token' --header 'Content-Type: application/x-www-form-urlencoded' --header 'Authorization: Basic <authcode>' --data-urlencode 'grant_type=client_credentials'
<authcode>
is the Base64 encoded string Clientid:Clientsecret
.
Record the access token generated on successful execution that would be used in invoking APIs.
Invoking APIs
Go to Monotype API that displays the list of API solutions Monotype has. Click on APIs that you want to try out. For example, select Smart Font Menu.
Click on the AUTHORIZE button present on the top right corner. A pop-up authorization window will open.
You can provide API credentials/authorization in two ways:
OAuth2: oauth2 (preferred)
Enter the ClientId and Client Secret obtained under OAuth2: oauth2 flow. The selected flow should be client credentials.
Click on AUTHORIZE button. It will call Authorization API in the background (token API curl mentioned in Authorization section) and generate the token.
Click OK.
Go to the path of the API that needs to be executed and click Execute.
Ensure that the credentials is oauth2 as displayed below. You will see the success response if authorization is successful.
Bearer Auth: bearerAuth
Copy the access token obtained after executing the curl command mentioned in the Authorization section under Token and click AUTHORIZE.
Click OK. Go to the API path that needs to be executed.
Click on Credentials dropdown and select bearerAuth as credentials.
Click Execute. You will see the success response if authorization is successful.