cURL
curl --request POST \ --url https://api.botpress.cloud/v1/chat/users/get-or-create \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-bot-id: <api-key>' \ --data '{ "tags": {}, "integrationName": "<string>", "name": "<string>", "pictureUrl": "<string>", "discriminateByTags": [ "<string>" ] }'
{ "user": { "id": "<string>", "createdAt": "2023-11-07T05:31:56Z", "updatedAt": "2023-11-07T05:31:56Z", "tags": {}, "name": "<string>", "pictureUrl": "<string>" } }
Retrieves the User object for a valid identifier. If the user does not exist, it will be created.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Your bot ID.
User data
The body is of type object.
object
Returns a User object if a valid identifier was provided. Returns an Error otherwise
The response is of type object.
Was this page helpful?