Page tree
Skip to end of metadata
Go to start of metadata

If connecting as a user, you will need to relevant user token, as well as the app key and app secret for the application from which the call is being made. The WWClient can be instantiated by calling the static method WWClient.buildClientApplicationAccess(userToken, appId, appSecret, authenticationEndpoint). The userToken is a string value passed back from full authentication via a browser. Once built, the WWClient can be authenticated. Once authenticated, all relevant Watson Work Services calls can be made.

Sample Code Block
 public void getMe() throws WWException, UnsupportedEncodingException {
	// Note, the below values are not valid ones!
    WWClient client = WWClient.buildClientUserAccess("ricoZt", "5c0bf268-c363-4aae-bbec-e2dbebb2fb72", "vKTpM47ST8ME9gQ9iWt_VjknvMCW", new WWAuthenticationEndpoint(), "");
    assert("Paul Withers".equals(me.getDisplayName()));

Authentication as a user returns a PeopleToken which is passed to the authenticationResult property of the WWClient. This includes setting the expiry date for authentication. Subsequent calls using the same WWClient object will check whether the expiry date has passed, in which case it will re-authenticate.


  1. Anonymous

    how do we get the initial user code?

    that "ricozt" in your example?

  2. Anonymous

    This is very interesting, I like it. I will always come to visit after. I will recommend to friends too. Keep up the magnificent work. I think this is engaging and eye-opening material. rospher essays Thank you so much for caring about your content and your readers.

  3. Anonymous

    This became very easy to understand the static method and a lot of things to do like completing your projects, Custom dissertation help, and papers. Everything has to be managed through apps.

  4. Anonymous

    Thanks for the post and really it can be understood and Blade Runner Coat the content is good and I really appreciate the article. Appreciable!

Write a comment…