1

I'm trying to authenticate to Atlas with the atlasapi. I'm using my google account and get the error ErrAtlasUnauthorized: Authentication is required with the below method. Is google auth supported or am I doing something wrong?

from atlasapi.atlas import Atlas
auth = Atlas("[email protected]","<password>","<groupId>")
clusters = auth.Clusters.get_all_clusters
print (clusters())

full trace:

ErrAtlasUnauthorized                      Traceback (most recent call last)
<ipython-input-61-d69a101fdf69> in <module>
      1 clusters = auth.Clusters.get_all_clusters
----> 2 print (clusters())

C:\...\atlasapi\atlas.py in get_all_clusters(self, pageNum, itemsPerPage, iterable)
    129 
    130             uri = Settings.api_resources["Clusters"]["Get All Clusters"] % (self.atlas.group, pageNum, itemsPerPage)
--> 131             return self.atlas.network.get(Settings.BASE_URL + uri)
    132 
    133         def get_single_cluster(self, cluster: str) -> dict:

C:\...\atlasapi\network.py in get(self, uri)
    144             logger.debug("Auth information = {} {}".format(self.user, self.password))
    145 
--> 146             return self.answer(r.status_code, r.json())
    147 
    148         except Exception:

C:\...\atlasapi\network.py in answer(self, c, details)
     68             raise ErrAtlasBadRequest(c, details)
     69         elif c == Settings.UNAUTHORIZED:
---> 70             raise ErrAtlasUnauthorized(c, details)
     71         elif c == Settings.FORBIDDEN:
     72             raise ErrAtlasForbidden(c, details)

ErrAtlasUnauthorized: Authentication is required

1 Answer 1

1

The API access keys are your User/Password.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.