Getting 401 error while accessing v4 couchbase apis from postman(


I have created a trial account for Couchbase Capella and generated an API key to access Couchbase APIs from Postman. However, when I send a request to using my API key token, I receive a 401 error. The error message indicates that the client IP needs to be included in the API key’s allowlist. Could someone please provide the steps to add my IP to the allowlist?

    "code": 1001,
    "hint": "The request is unauthorized. Please ensure you have provided appropriate credentials in the request header. Please make sure the client IP that is trying to access the resource using the API key is in the API key allowlist.",
    "httpStatusCode": 401,
    "message": "Unauthorized"

Thanks for quick response. I have added my ip. Still I’m getting same error.

The other possible in the error message is the credentials. Here’s an example of Capella APIs


I am trying to use the V4 APIs from Postman. For the V4 APIs, we do not need to pass cbc_api_message, correct? According to the documentation (Make an API Call with the Management API v4.0 | Couchbase Docs), it should work directly with the API key token.

What do you get when using the curl command from the documentation?

Tried. Same error.

You can try creating a new API Key and add your IP address on the “Allowed IP Address” for the API Key

Reference: Get Started with the Management API v4.0 | Couchbase Docs

I have tried multiple times, but no luck.

It would seem that all the prerequisites are not satisfied

It seems the API Management version 3 is being used in the Trial Account. Please try to access using the V3 format: Make an API Call with the Management API v3.0 | Couchbase Docs

Hi @mijicherian
Do we need to upgrade our account to access the V4 APIs? Will a trial account not suffice? We specifically need access to the V4 APIs. I have created organization level API key.

Yes. You may need to upgrade your account. Once you upgrade you will get the option to create management API keys with Version 3 and version 4 something like below.

Thanks for the information @mijicherian