{"error": "invalid_client"} on calling Mashery API

{"error": "invalid_client"} on calling Mashery API

book

Article ID: KB0074699

calendar_today

Updated On:

Products Versions
TIBCO Cloud API Management -

Description

A successful token endpoint call for Mashery V3 API looks like below.

curl -i -u <Mashery API Key>:<Mashery API Secret> 'https://api.mashery.com/v3/token' -d 'grant_type=password&username=<username>&password=<password>&scope=<Area or tenant UUID>'

Mashery API Key and secret: This is obtained from Mashery developer portal https://developer.mashery.com/. 
Username and password: These are the credentials that you use on your tenant/area. The user has to have admin access to make calls to Mashery APIs.
Area or tenant UUID: This can be obtained from the Control Center home page of the area. 

The response "invalid client" is received when the Mashery API Key or secret has incorrect values. This needs to be verified and corrected. If required, login to the Mashery developer portal, navigate to "My Account" to verify the API key/Secret being used. 

Issue/Introduction

This article provides details on how to resolve the error "invalid client" while creating Mashery V3 OAuth token.