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(), "https://openntf.org");
    client.authenticate();
    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.

15 Comments

  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!

  5. Anonymous

    This is very useful code for all students who learning programming. I definitely share this data with my students who are taking assignment writing service from me. Ida Wallace, assignment writing service provider at Assignment Help Folks. http://www.assignmenthelpfolks.com/finance/

  6. Anonymous

    I am thankful to you for providing here sample code block for WWClient object which will check whether the expiry date has passed, in which case it will re-authenticate. It will actually sharable information for IT learners whom I am also serving dissertation assistance at Dissertation Help - http://www.dissertationhelp.uk/ in UK. And hope it would be helpful for them.

  7. Anonymous

    Such wonderful blogs with almost all the current scenarios intact. We are the best Cleaning Company in Dubai, YallaCleaning fills in as the solid, trusted and disentangled cleaning center for the Middle East cleaning industry.

    1. You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.
  8. Anonymous

    This article is well written and very informative. I really like this site because it offers loads of information to its followers. Furniture Rentals in Dubai bring for your luxury rental furniture. So contact us to get the best offer on furniture rentals also get detail of our furniture rental in Dubai to enjoy our rental furniture services.

  9. Anonymous

    i appreciated your hard work and content writer, Its very interesting and informative article for me. I would love to share your article to other platforms. Assassin's Creed Jacob Frye Costume Thanks for sharing!

  10. Anonymous

    This is so informative post. You shared here such a helpful information about Java with the code.

    Regards,

    Caroline Webb

    http://www.assignmenthelpfolks.com/marketing/

  11. Anonymous

    Case Study Writing Service Provider are not that expensive for Custom Case Study Writing Services since they complete high standard Case Study Assignment Services?

  12. Anonymous

    Personally I am so happy to found this beautiful post. I think this information will helpful for all because you describe with the sample code.

    Regards, Alyssa Patterson,  

    http://www.secureassignmenthelp.com/health-care-assignment-help/

  13. Anonymous

    It is understandable that one is more confident when their task is in the hands of the Professional Essay Writing Help than a novice; thus, one hires Essay Writing Assignment Help Writer who delivers the ideal Custom Essay Paper

  14. Anonymous

    Do you require Affordable Nursing Research Papers Services for your assignments’ needs, but you are unsure of the Legitimate Nursing Research Paper Writing firm to contract? Our Nursing Research Paper Writing Company has credibility and has been providing homework solutions.

  15. Anonymous

    I am happy to found this very informative blog about sample code block for WWClient. Thanks for sharing with us.

    -Alex Juvion, http://www.qualityassignment.co.uk/marketing-coursework-help/