Authenticate a workspace user by user name or email.
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/auth/login"), Content = new StringContent("{ \"UserNameOrEmail\": \"example\", \"Password\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"UserNameOrEmail":"example","Password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/workspace/auth/login \ --header 'Content-Type: application/json' \ --data '{ "UserNameOrEmail": "example", "Password": "example" }'Locale is resolved from the workspace settings.
Request Body
Section titled “Request Body”Request payload to authenticate a workspace user.
object
Workspace user name or email address.
Account password.
Examplegenerated
{ "UserNameOrEmail": "example", "Password": "example"}Request payload to authenticate a workspace user.
object
Workspace user name or email address.
Account password.
Examplegenerated
{ "UserNameOrEmail": "example", "Password": "example"}Request payload to authenticate a workspace user.
object
Workspace user name or email address.
Account password.
Examplegenerated
{ "UserNameOrEmail": "example", "Password": "example"}Responses
Section titled “Responses”OK
object
Workspace authentication response with access token and user profile.
object
Access token for the workspace session.
Workspace user identifier.
User login name.
User email address.
User first name.
User last name.
Workspace slug identifier.
Workspace locale code.
Workspace time zone identifier.
Workspace date-time format pattern.
Workspace date format pattern.
Workspace time format pattern.
Workspace routing region code.
Role names assigned to the user.
Permission keys assigned to the user.
Typed module availability snapshot included in the authenticated user context.
object
Availability state for one workspace module in the authenticated user context.
object
Availability state for one workspace module in the authenticated user context.
object
Availability state for one workspace module in the authenticated user context.
object
Availability state for one workspace module in the authenticated user context.
object
Availability state for one workspace module in the authenticated user context.
object
object
object
object
object
Example
{ "Data": { "UserType": 0, "OnboardingStatus": 0 }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Bad Request
object
Workspace authentication response with access token and user profile.
object
Access token for the workspace session.
Workspace user identifier.
User login name.
User email address.
User first name.
User last name.
Workspace slug identifier.
Workspace locale code.
Workspace time zone identifier.
Workspace date-time format pattern.
Workspace date format pattern.
Workspace time format pattern.
Workspace routing region code.
Role names assigned to the user.
Permission keys assigned to the user.
Typed module availability snapshot included in the authenticated user context.
object
Availability state for one workspace module in the authenticated user context.
object
Availability state for one workspace module in the authenticated user context.
object
Availability state for one workspace module in the authenticated user context.
object
Availability state for one workspace module in the authenticated user context.
object
Availability state for one workspace module in the authenticated user context.
object
object
object
object
object
Example
{ "Data": { "UserType": 0, "OnboardingStatus": 0 }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}