Constant 401 Unauthorized while trying to access an API

363 Views Asked by At

I am pretty sure my ID and secret are correct. Here's the link to the yours truly: (https://sandbox.mngkargo.com.tr/en/node/266)

POST https://testapi.mngkargo.com.tr/mngapi/api/token
Headers:
Content-Type: application/json
Accept: application/json
X-IBM-Client-Id: [ID goes here]
X-IBM-Client-Secret: [Secret goes here]
x-api-version: v1

The response I constantly get:

Code: 401 Unauthorized
Headers:
content-type: application/json
{
  "httpCode": "401",
  "httpMessage": "Unauthorized",
  "moreInformation": "Invalid client id or secret."
}

Please don't bother throwing rocks at me for my incompetency. For I am already a very broken man.

Couldn't work it through Postman either. At this point I'm starting to change professions while I am still young.

1

There are 1 best solutions below

0
hulk6hulk On

You wrote api secret wrong You will first create a subscription to identity, then select API user. There are two different verifications in the identity method, the first is api key and api secret verification with auth, and the other is the customer id and password section in the body section.