<?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: Admin API - Java in APIs</title>
    <link>https://community.cisco.com/t5/apis/admin-api-java/m-p/4885161#M658</link>
    <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Hi Kristina,&lt;/P&gt;
&lt;P&gt;Thanks for your response.&lt;/P&gt;
&lt;P&gt;when i am using the code as &lt;CODE&gt;Option opt; 		opt = new Option("api-XXXXXXXX.com", true, "API hostname (required)");&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;i am getting error as&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;Exception in thread "main" java.lang.IllegalArgumentException: opt contains illegal character value '-'
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Please help me out here.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 01 Sep 2022 10:48:33 GMT</pubDate>
    <dc:creator>Ripul</dc:creator>
    <dc:date>2022-09-01T10:48:33Z</dc:date>
    <item>
      <title>Admin API - Java</title>
      <link>https://community.cisco.com/t5/apis/admin-api-java/m-p/4885159#M656</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Hi There,&lt;/P&gt;
&lt;P&gt;I need some assistance in calling DUO api for admin activities like create user, edit user, delete user. I am almost done but I need assistance on below one&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Pre-request Script for HTTP requests&lt;/STRONG&gt;&lt;BR /&gt;
The Duo APIs use HTTP Basic Authentication. The password value expected with each request is a hash of several concatenated request elements. Due to the dynamic nature of the HTTP Basic Authentication value needed for each request to the API, additional configuration is needed within Postman. Postman provides the ability to execute Javascript code prior to the HTTP request being sent. This is accomplished using the Pre-request Script setting within each HTTP request.&lt;/P&gt;
&lt;P&gt;Before sending a request it calls the javascript for HTTP Basic Authentication.&lt;/P&gt;
&lt;P&gt;Can I get the same JavaScript code in Java?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 31 Aug 2022 20:41:12 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/admin-api-java/m-p/4885159#M656</guid>
      <dc:creator>Ripul</dc:creator>
      <dc:date>2022-08-31T20:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: Admin API - Java</title>
      <link>https://community.cisco.com/t5/apis/admin-api-java/m-p/4885160#M657</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Have you taken a look at our &lt;A href="https://github.com/duosecurity/duo_client_java"&gt;Java API example client&lt;/A&gt;? It shows how to construct the &lt;A href="https://github.com/duosecurity/duo_client_java/blob/c389c9e6bb5a7b8cb3f2aef57f46efc329b2f075/duo-client/src/main/java/com/duosecurity/client/Http.java"&gt;HTTP request with signing&lt;/A&gt;.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 31 Aug 2022 22:23:15 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/admin-api-java/m-p/4885160#M657</guid>
      <dc:creator>DuoKristina</dc:creator>
      <dc:date>2022-08-31T22:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Admin API - Java</title>
      <link>https://community.cisco.com/t5/apis/admin-api-java/m-p/4885161#M658</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Hi Kristina,&lt;/P&gt;
&lt;P&gt;Thanks for your response.&lt;/P&gt;
&lt;P&gt;when i am using the code as &lt;CODE&gt;Option opt; 		opt = new Option("api-XXXXXXXX.com", true, "API hostname (required)");&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;i am getting error as&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;Exception in thread "main" java.lang.IllegalArgumentException: opt contains illegal character value '-'
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Please help me out here.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 01 Sep 2022 10:48:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/admin-api-java/m-p/4885161#M658</guid>
      <dc:creator>Ripul</dc:creator>
      <dc:date>2022-09-01T10:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Admin API - Java</title>
      <link>https://community.cisco.com/t5/apis/admin-api-java/m-p/4885162#M659</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;It looks like you’re trying to specify the value of the option with that class, rather than setting up a command-line option itself.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/duosecurity/duo_client_java/blob/7ec0733ff1a7768dafaf17504ef86a84921147a2/duo-example-admin/src/main/java/com/duosecurity/example/DuoAdmin.java#L37"&gt;Here’s how it’s done in the example API client&lt;/A&gt;.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 01 Sep 2022 16:40:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/admin-api-java/m-p/4885162#M659</guid>
      <dc:creator>DuoKristina</dc:creator>
      <dc:date>2022-09-01T16:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: Admin API - Java</title>
      <link>https://community.cisco.com/t5/apis/admin-api-java/m-p/4885163#M660</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Hi Kristina,&lt;/P&gt;
&lt;P&gt;Thanks for your help , i manage to complete below task&lt;BR /&gt;
1- Create User&lt;BR /&gt;
2- Create Phone&lt;BR /&gt;
3- Associate Phone and user.&lt;/P&gt;
&lt;P&gt;Now i am struggling to send OR code over the email of user. Please help me&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 02 Sep 2022 03:09:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/admin-api-java/m-p/4885163#M660</guid>
      <dc:creator>Ripul</dc:creator>
      <dc:date>2022-09-02T03:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Admin API - Java</title>
      <link>https://community.cisco.com/t5/apis/admin-api-java/m-p/4885164#M661</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Hi Kristina,&lt;/P&gt;
&lt;P&gt;As an alternate option I am generating an activation code &lt;CODE&gt;/admin/v1/phones/[phone_id]/activation_url&lt;/CODE&gt; and then i am calling &lt;CODE&gt;/admin/v1/phones/[phone_id]/send_sms_activation&lt;/CODE&gt;.&lt;BR /&gt;
Below is my code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;Http request = new Http.HttpBuilder("POST", cmd.getOptionValue("host"),
					"/admin/v1/phones/" + phone_id + "/send_sms_activation").build();
request.addParam("installation_msg", "Welcome To MQF Sandhya Sinha &amp;lt;insturl&amp;gt;");
request.addParam("activation_msg", "Welcome To Marquis Finance Sandhya Sinha To Activate &amp;lt;acturl&amp;gt;");
request.addParam("valid_secs", "60");
request.addParam("install", "1");
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;By using the above code sometimes it sends only &lt;CODE&gt;installation_msg&lt;/CODE&gt; that is &lt;CODE&gt;Welcome To MQF Sandhya Sinha http://m-nnnnnn.duosecurity.com&lt;/CODE&gt; but this one does not have the activation code which is an issue and some time it sends only &lt;CODE&gt;activation_msg&lt;/CODE&gt; and some time both.&lt;/P&gt;
&lt;P&gt;So I am a bit confused what is the correct way , for me &lt;CODE&gt;activation_msg&lt;/CODE&gt; is the best way because it contains activation code.&lt;/P&gt;
&lt;P&gt;Please help&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 02 Sep 2022 14:46:55 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/admin-api-java/m-p/4885164#M661</guid>
      <dc:creator>Ripul</dc:creator>
      <dc:date>2022-09-02T14:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: Admin API - Java</title>
      <link>https://community.cisco.com/t5/apis/admin-api-java/m-p/4885165#M662</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;Now i am struggling to send OR code over the email of user&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;There isn’t an AdminAPI endpoint that will &lt;STRONG&gt;email&lt;/STRONG&gt; the activation code. As you noted, &lt;CODE&gt;send_sms_activation&lt;/CODE&gt; will text the code to the phone’s &lt;CODE&gt;number&lt;/CODE&gt;.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;By using the above code sometimes it sends only &lt;CODE&gt;installation_msg&lt;/CODE&gt; that is &lt;CODE&gt;Welcome To MQF Sandhya Sinha http://m-nnnnnn.duosecurity.com&lt;/CODE&gt; but this one does not have the activation code which is an issue and some time it sends only &lt;CODE&gt;activation_msg&lt;/CODE&gt; and some time both.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Are you trying that POST again within the &lt;CODE&gt;valid_secs&lt;/CODE&gt; lifetime? The activation code changes on each post but the installation information does not. If you POST and then don’t make the same request again for more than 60 seconds does it resend the installation message too?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Sep 2022 21:31:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/admin-api-java/m-p/4885165#M662</guid>
      <dc:creator>DuoKristina</dc:creator>
      <dc:date>2022-09-08T21:31:36Z</dc:date>
    </item>
  </channel>
</rss>

