Choosing the environment
You must decide which environment you are pointing your plugin at. In all the following code samples, we use the placeholder_cloudserver.com_ which should be replaced with the URL of the environment you would like to use. The production environment is https://grantamaterials.ansys.com/
Setting the launch point
Choose a suitable location in your application to add the option that launches Granta Material Picker. For example, a toolbar button or context menu:

Authenticating
To connect to Granta Material Picker, you must provide a valid access token. For more information, see Authentication.Creating an integration service session
Create a session for the Integration Service by sending an HTTPPOST request to the /sessions endpoint.
Here is an example request payload:
"uid": "6bd31d4e-86ff-4b14-8fea-e74386d49e8b"
Ensure that the ID of this session is stored for future usage.
Launch a browser
Your end user must be prompted to select some material models. Do this by launching a browser at the URL of the cloud instance, and append your session ID. Use the format:https://cloudserver.com/grantami/#/granta-material-picker?sessionId=<sessionid>
Where cloudserver.com is the URL of the instance that you want to code against (either Staging or Production).
Receiving model data
There are two ways to receive the selected material model data. The preferred approach is to listen for Server-Sent Events (SSE) using the session dataSSE endpoint. Sending an HTTP GET request to /sessions/{session_uid}/data/SSE acts as an event source and returns data as soon as materials are available. For an example, see Using SSEs.
A simpler approach is to send a GET request for your session data. GET requests to the /sessions/{session_uid}/data endpoint wait for the value specified by pollSeconds in the session options.