Overview

Currently, the Builder uses the User Info service to:

  • Store and update the Builder-specific data for a user.
  • Upload and store the user's profile avatar.

This information is linked to the data retrieved from the access token.

For details of how to retrieve general information about a YaaS user, see the Account service API Reference.


API Reference

/userinfo

/userinfo

get

Returns the user information as JSON keys and values.

post

Returns the user information as JSON keys and values.

put

Updates the user information. Provide user properties as keys and values in JSON format.

/organizations

/organizations

get

Returns list of organizations a user is a member of (including direct and transitive membership).

Security / Access Control:
To access this method you need valid access token issued for the user (the user is read out of access token).

/pictures

/pictures

post

Allows you to upload a picture used as user avatar.

/pictures/{userId}

get

Returns a picture (avatar) for the current user.

delete

Deletes a picture (avatar) for the current user.

Security / Access Control:
To access this method you need valid access token issued for the user and it must be in compliance with {userId} path parameter.


Events

For more information about events, see the PubSub service documentation.
The User Info service does not send public events.


Security

The User Info service doesn't require any custom scopes in the access token.

Please note that the content of the avatar image is publicly available. Any use of personal images, copyrighted images or images showing inappropriate content is solely in the responsibility of the person or entity owning the user account and providing that content.


Introduction to Tutorials

The tutorial shows you the real life response of the User Info service.


Retrieve User Information

In this tutorial, retrieve the Builder-specific information about a YaaS user. It is linked with the data encoded in the access token.

Request

To retrieve the Builder specific information about the user you need:

  • Method: GET
  • Request URL: http://api.eu.yaas.io/hybris/userinfo/v1/userinfo
  • Headers:
    • Authorization: This sends a valid OAuth2 access token. To access this method, the access token must be issued for the given user (email address).

Example

This example shows a GET request to the userinfo endpoint:

curl 'http://api.eu.yaas.io/hybris/userinfo/v1/userinfo' -H "Authorization: Bearer 021-cb5b8706-09a5-49c8-8516-f5ea552fdef0"

Response

The successful response returns a 200 status code and information about the user data, similar to this example:

{
"helpMode":"true",
"_currentOrganizationId":"8904f4a3c54e24db98850859",
"builder_accomplished_tours":"[\"Home_nav\"]"
}

For more information about error codes, see the API Reference.


Security

The User Info service doesn't require any custom scopes in the access token.

Please note that the content of the avatar image is publicly available. Any use of personal images, copyrighted images or images showing inappropriate content is solely in the responsibility of the person or entity owning the user account and providing that content.


Glossary

TermDescription
avatarAn icon, image, or a figure representing a particular computer user.


  • Send feedback

    If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.

  • Get Help

    Use our private help channel. Receive updates over email and contact our specialists directly.

  • hybris Experts

    If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.