How to prepare auth for MongoDB Atlas Administration API?

Hello,

I am integrating Project IP Access List, of MongoDB Atlas Administration API (1.0),

What I achieved:

  • I have the groupId (project id)
  • I have the publicKey and privateKey (with required access permissions)

I am not able to find how to prepare and pass DigestAuth (HTTP Authorization Scheme) in API call, I found this Authentication Note but did not help,

Any practical example or documentation would be great,

Let me know if I am missing anything,
Thanks.

Hi @turivishal

It will depend what you are using for your api calls. cURL for example has --digest flag, python requests has requests.auth.HTTPDigestAuth() class. Its not generally something you’ll have to do for yourself.

Currently, I am executing this call in postman, I have selected Digest Auth type in the Authorization tab and added username and password, When I execute its response:

<h1>Bad Message 400</h1>
<pre>reason: Ambiguous URI empty segment</pre>

My end goal is to implement it in nodejs/expressjs (got NPM)!

I found the tutorial in MongoDB Developer Resources, and it is working for me,

The below deprecated document helped me instead of the new one,

Thanks, @chris