0

I am trying to solve this problem but I don't know what am I doing wrong?

Here is the documentation https://duo.com/docs/adminapi#create-user

import java.io.*;
import java.net.URL;
import java.net.HttpURLConnection;

public class duo {
    
    public static void main(String[] args) throws IOException, InterruptedException {
// Create a neat value object to hold the URL

  URL url;
      url = new URL("?Authorization =Basic&Integration key: Secret key=DILV:DLr5bzSztv&Date=Sat, 14 Aug 2021 02:19:40 +0000&Content-Type: application/x-www-form-urlencoded=api-e9770554.duosecurity.com&=/admin/v1/users&=username=xyz");



// Open a connection(?) on the URL(??) and cast the response(???)
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();

// Now it's "open", we can set the request method, headers etc.
        connection.setRequestProperty("accept", "application/json");

// This line makes the request
        InputStream responseStream = connection.getInputStream();

 }

}

Error

{
    "code": 40401,
    "message": "Resource not found",
    "stat": "FAIL"
}

0 Answers0