Skip to content

Authentication for the web socket collector

Before you can start sending data to Manufactory via a web socket, you need to authenticate the client/end-user.

You can authenticate users using the endpoint POST /auth.

Required header:

  • X-Manufactory-Auth - Project key of the project to be populated.

Required keys

  • org_id (required) string - Manufactory org ID.
  • project_id (required) number - The project ID associated with this schema.
  • actor_profile (required) object - Pairs containing attribute name and the corresponding value while considering the correct attribute names and data types. Please refer to Get Actors schema.

Request example

{
"org_id": "xyz",
"project_id": 12345,
"actor_profile":{
"city": "New York",
"country": "USA",
"username": "john.doe",
"email": "john.doe@email.com"
}
}

Response example

{
"org_id": "xyz",
"project_id": 12345,
"actor_profile_id": 1,
"client_uuid": "dcd21714-894c-46bc-9d59-ae9f22753205"
}

The generated client UUID is limited to this specific user profile, and it’s valid for a 12 hours session. After 12 hours, you would need to re-authenticate the client.

Websocket > Authentication for the web socket collector

Authentication for Manufactory websocket connections requires a POST request to /auth with project key header and payload containing org_id project_id and actor profile which generates a client UUID valid for 12 hours.

Websocket > Connect to our Web Socket Server

After establishing a websocket connection with Manufactory Collector, users need to authenticate by sending a message containing their org ID, project ID, actor profile ID, and client UUID to pair the connection with the client.

Websocket > Connect to our Web Socket Server

A websocket connection process requiring authentication with client UUID and actor profile ID followed by connection pairing through specific message parameters to enable event transmission.

Actors > Create actors schema

The POST /actors/schema endpoint enables creation of user profiles by specifying organization ID project ID unique identifier and attribute definitions through an authenticated request.