You need to provide a token in your mongo URI. Check the info panel for mongodb, it should have the correct URI there.
@Karthik27 So after reading the MongoDB atlas, it seems you have made a few errors in your code, one of them was you forgot to import dns, another was the link itsself, you were connecting to your client it seems, and then trying to access your database from there. If you are using cloud, it should have been the link to your database.
Here is the link to atlas: https://docs.atlas.mongodb.com/driver-connection/
I can only ask you to verify the URL as I'm pretty sure
admin are not normally accepted by online services for username and password. Make sure the credentials are correct and the cluster name along with the database name is right.