API :: User widget

User widget is the right way to get Nexaas ID feature inside your application. The URL path is /api/v1/widgets/user.js. It returns a Javascript that enable rendering the widget where you want, and requires access token in a bearer authorization header or in the query string.

The script must be similar to:

  function initWidget(NexaasID) {
    var wrapper = document.getElementById('widgetWrapper');


Where widgetWrapper is the ID for the HTML element that will contain the user widget, and the $ACCESS_TOKEN is the access token got from an authorization code.

Note: the user widget will NOT be rendered for signed out access.