Atomically exchange the one-time completion code for a normal Workspace bearer.
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/external/exchange"), Content = new StringContent("{ \"Code\": \"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/external/exchange';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"Code":"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/external/exchange \ --header 'Content-Type: application/json' \ --data '{ "Code": "example" }'Request Body
Section titled “Request Body”One-time exchange request received after the OIDC completion redirect.
object
Examplegenerated
{ "Code": "example"}One-time exchange request received after the OIDC completion redirect.
object
Examplegenerated
{ "Code": "example"}One-time exchange request received after the OIDC completion redirect.
object
Examplegenerated
{ "Code": "example"}Responses
Section titled “Responses”OK
object
Normal local session plus the validated local return path.
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.
Canonical effective display name.
Avatar presentation values for a workspace user.
object
Initials derived from the user name.
Hex color for the avatar background.
Hex color for the avatar text.
Workspace slug identifier.
Workspace locale code.
Personal interface locale code of the user; null follows the workspace Moltaro.Security.Auth.Models.LoginResponse.Locale.
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
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": { "Session": { "UserType": 0, "OnboardingStatus": 0 } }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Bad Request
object
Normal local session plus the validated local return path.
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.
Canonical effective display name.
Avatar presentation values for a workspace user.
object
Initials derived from the user name.
Hex color for the avatar background.
Hex color for the avatar text.
Workspace slug identifier.
Workspace locale code.
Personal interface locale code of the user; null follows the workspace Moltaro.Security.Auth.Models.LoginResponse.Locale.
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
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": { "Session": { "UserType": 0, "OnboardingStatus": 0 } }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}