User group and python script

Hi everyone ,
I want to create user group through python scripts to Duo . can any anyone help me out on how to add user group to duo by python script ?

Thank you

Hey @r_acolatse!

I’d recommend taking a look at our Python client library. This will make it much easier to get started with our Admin API. We have a script in the examples folder for creating a user and phone in Duo. This can be tweaked to add a group as well!

You’ll want to take a look at our Groups endpoint and also our Users endpoint to create a group and add users.

Hope this helps!

  • Colin

Hi @cmedfischduo

Thank you for help . I have already able to create user and phone in duo How do I get the group id for groups to be able to create user with group on python.

Hey @r_acolatse, you can Retrieve Group IDs via https://duo.com/docs/adminapi#retrieve-groups

Hi @cmedfischduo thank you for help . do you have video examples or python script examples of how to create the group on duo