Confluence XML-RPC

Poojaa Sudhakaran August 7, 2020

Hello there,

I'm trying to create users in Confluence using XML-RPC, however I'm not able to retrieve token in the first place. My confluence version is 7.41. Below is my Java code snippet.

The "loginToken"  variable in the below code always results in a null. Could you please help me in resolving this?

 // Initialise RPC Client
XmlRpcClient rpcClient = new XmlRpcClient("https://<hostname>/rpc/xmlrpc");

// Login and retrieve logon token
Vector loginParams = new Vector(2);
loginParams.add(USER_NAME);
loginParams.add(PASSWORD);
String loginToken = (String) rpcClient.execute("confluence2.login", loginParams);
System.out.println("Token: " + loginToken);

 Regards,

Poojaa

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events