Atlas index api returns 401 but api public key and private has required authorization

Hi All expert,
I am trying to use atlas API to get indexes of my collection. But it always return authorized.
I created API key from organization level. Then assigned project owner run on project level.
Via follow steps from https://www.mongodb.com/docs/atlas/reference/api/fts-indexes-get-all/
It should work but it always retrun 401. May u know any way to check why this is happening?

I think you’ll get a 401 if they don’t include the API Key in the request or if they use an invalid one. You might also need to add their IP to the access list: https://www.mongodb.com/docs/atlas/configure-api-access/#edit-an-api-key-s-access-list