<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Create user using admin api in APIs</title>
    <link>https://community.cisco.com/t5/apis/create-user-using-admin-api/m-p/4876224#M45</link>
    <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;I’ve poured through that documentation, but it doesn’t give any examples of an http post. And unfortunately I’m not that familiar with any of the languages that are in the documentation, except for Java.&lt;/P&gt;
&lt;P&gt;Do you know of any place where I can see a working example of an http post to create or delete a user? Thanks.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 26 Jul 2018 01:59:04 GMT</pubDate>
    <dc:creator>Brian_Fleishman</dc:creator>
    <dc:date>2018-07-26T01:59:04Z</dc:date>
    <item>
      <title>Create user using admin api</title>
      <link>https://community.cisco.com/t5/apis/create-user-using-admin-api/m-p/4876222#M43</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;I currently have duo 2fa integrated with our custom webapp. I would like to now be able to create a user on our account using the admin api. But I cannot find any documentation that has an example of how to do so.&lt;/P&gt;
&lt;P&gt;I can see from the documentation that it’s a post command, but it has no specifics. Can anyone give me an example of that or point me in the right direction?&lt;/P&gt;
&lt;P&gt;Thanks you.&lt;BR /&gt;
-Brian&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 24 Jul 2018 21:19:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/create-user-using-admin-api/m-p/4876222#M43</guid>
      <dc:creator>Brian_Fleishman</dc:creator>
      <dc:date>2018-07-24T21:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create user using admin api</title>
      <link>https://community.cisco.com/t5/apis/create-user-using-admin-api/m-p/4876223#M44</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Hello Brian_Fleishman!&lt;/P&gt;
&lt;P&gt;The best reference is our &lt;A href="https://duo.com/docs/adminapi"&gt;Admin API documentation&lt;/A&gt;. The &lt;A href="https://duo.com/docs/adminapi#api-details"&gt;API Details&lt;/A&gt; section should help you figure it out. Additionally, you may find it useful to look at our API demo clients out on our &lt;A href="https://github.com/duosecurity"&gt;GitHub&lt;/A&gt;, like our &lt;A href="https://github.com/duosecurity/duo_client_python"&gt;Python demo client&lt;/A&gt;.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 25 Jul 2018 19:52:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/create-user-using-admin-api/m-p/4876223#M44</guid>
      <dc:creator>DuoKristina</dc:creator>
      <dc:date>2018-07-25T19:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create user using admin api</title>
      <link>https://community.cisco.com/t5/apis/create-user-using-admin-api/m-p/4876224#M45</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;I’ve poured through that documentation, but it doesn’t give any examples of an http post. And unfortunately I’m not that familiar with any of the languages that are in the documentation, except for Java.&lt;/P&gt;
&lt;P&gt;Do you know of any place where I can see a working example of an http post to create or delete a user? Thanks.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Jul 2018 01:59:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/create-user-using-admin-api/m-p/4876224#M45</guid>
      <dc:creator>Brian_Fleishman</dc:creator>
      <dc:date>2018-07-26T01:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create user using admin api</title>
      <link>https://community.cisco.com/t5/apis/create-user-using-admin-api/m-p/4876225#M46</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Hi Brian,&lt;BR /&gt;
I was in the same boat just hours ago.  I was having issues trying to figure out how to just retrieve a user’s information via the admin API.  I’m doing it in PHP, but I’m sure the translation to java would be, hopefully, straight forward:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;See &lt;A href="https://duo.com/docs/adminapi" rel="nofollow noopener"&gt;Duo Admin API | 				 	Duo Security&lt;/A&gt; for docs&lt;/LI&gt;
&lt;LI&gt;Download source files at &lt;A href="https://github.com/duosecurity" rel="nofollow noopener"&gt;https://github.com/duosecurity&lt;/A&gt;
&lt;/LI&gt;
&lt;LI&gt;Files of interest will be in the folder duo_api_php/src&lt;/LI&gt;
&lt;LI&gt;Retrieve the integration key, secret key and api URL by logging into the Duo console (&lt;A href="http://www.duo.com" rel="nofollow noopener"&gt;www.duo.com&lt;/A&gt;) and navigating to Applications and clicking on the Admin API user that you have set up in “first steps” of &lt;A href="https://duo.com/docs/adminapi#first-steps" rel="nofollow noopener"&gt;Duo Admin API | 				 	Duo Security&lt;/A&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I created a sample php script that pulled the information for one user (see below).  To create a user you would call the “create_user” method that is contained in the Admin.php file.  You can see in that function/method its doing a POST.  Parameters are found here: &lt;A href="https://duo.com/docs/adminapi#create-user" rel="nofollow noopener"&gt;Duo Admin API | 				 	Duo Security&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Sample source code for calling the “users” method of the “Admin” class&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?php
namespace DuoAPI;
 
include 'Requester.php';
include 'CurlRequester.php';
include 'Client.php';
include 'Admin.php';
 
$D = new Admin("integration key here","secret key here","api-stuffhere.duosecurity.com");
# just a particular user     
#  $users = $D-&amp;gt;users("smith");

# all users
  $users = $D-&amp;gt;users();

  // Loop through Array
  foreach ($users["response"]["response"] as $key =&amp;gt; $value) {
print $value["username"] .  "  " . $value["email"] .  "  " . $value["realname"] . "\n";
  }
 
 ?&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Jul 2018 19:31:32 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/create-user-using-admin-api/m-p/4876225#M46</guid>
      <dc:creator>Todd_Haddaway</dc:creator>
      <dc:date>2018-07-26T19:31:32Z</dc:date>
    </item>
  </channel>
</rss>

