Quantcast
Channel: Ignite Realtime : Unanswered Discussions - Support
Viewing all articles
Browse latest Browse all 4979

use openfire userService has an error:RequestNotAuthorised

$
0
0

I am using openfire userService plugins to get all users,so I use the url:http://localhost:9090/plugins/userService/userservice. However has an error

The follow is my code:

 

 

 

 

 

  RequestParams params = new RequestParams();

params.addHeader("Authorization", "EuwWSY8W");

  params.addHeader("Content-Type", "application/json");

  HttpUtils http = new HttpUtils();

  http.configTimeout(10000);

  http.send(HttpMethod.GET, "http://localhost:9090/plugins/userService/userservice", params, new RequestCallBack<String>() {

@Override

  public void onSuccess(ResponseInfo<String> responseInfo) {

  System.out.println("result-->"+responseInfo.result);

  }

@Override

  public void onFailure(HttpException error, String msg) {

  System.out.println("error--->"+error);

  System.out.println("errormsg-->"+msg);

  }

  });

 

 

then I get the message:

result--><error>RequestNotAuthorised</error>

I had set the userService Enabled and secret key at Admin Console. who can help me please?


Viewing all articles
Browse latest Browse all 4979

Trending Articles