Connectors
Connectors are the bridge between Logto and other third-party vendors who provide short message service (SMS), email service, or user information on wildly accepted social media.
To learn more about connectors, please see 🪛 Configure connectors.
curl \
--request DELETE 'https://[tenant_id].logto.app/api/connectors/{id}' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Get active user data
Get active user data, including daily active user (DAU), weekly active user (WAU) and monthly active user (MAU). It also includes an array of DAU in the past 30 days.
curl \
--request GET 'https://[tenant_id].logto.app/api/dashboard/users/active' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"dauCurve": [
{
"date": "string",
"count": 42.0
}
],
"dau": {
"count": 42.0,
"delta": 42.0
},
"wau": {
"count": 42.0,
"delta": 42.0
},
"mau": {
"count": 42.0,
"delta": 42.0
}
}
Create organization invitation
Create an organization invitation and optionally send it via email. The tenant should have an email connector configured if you want to send the invitation via email at this point.
Body
Required
The organization invitation to create.
-
The ID of the user who is inviting the user to join the organization.
Maximum length is
21
. -
The email address of the user to invite to join the organization.
-
The ID of the organization to invite the user to join.
Minimum length is
1
, maximum length is21
. -
The epoch time in milliseconds when the invitation expires.
-
The IDs of the organization roles to assign to the user when they accept the invitation.
curl \
--request POST 'https://[tenant_id].logto.app/api/organization-invitations' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"inviterId":"string","invitee":"hello@example.com","organizationId":"string","expiresAt":42.0,"organizationRoleIds":["string"],"messagePayload":{"code":"string","link":"string","key":"string"}}'
{
"inviterId": "string",
"invitee": "hello@example.com",
"organizationId": "string",
"expiresAt": 42.0,
"organizationRoleIds": [
"string"
],
"messagePayload": {
"code": "string",
"link": "string",
"key": "string"
}
}
{
"tenantId": "string",
"id": "string",
"inviterId": "string",
"invitee": "string",
"acceptedUserId": "string",
"organizationId": "string",
"status": "Pending",
"createdAt": 42.0,
"updatedAt": 42.0,
"expiresAt": 42.0,
"organizationRoles": [
{
"id": "string",
"name": "string"
}
]
}
curl \
--request POST 'https://[tenant_id].logto.app/api/organizations' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"tenantId":"string","name":"string","description":"string","customData":{},"isMfaRequired":true,"branding":{"logoUrl":"string","darkLogoUrl":"string","favicon":"string","darkFavicon":"string"},"createdAt":42.0}'
{
"tenantId": "string",
"name": "string",
"description": "string",
"customData": {},
"isMfaRequired": true,
"branding": {
"logoUrl": "string",
"darkLogoUrl": "string",
"favicon": "string",
"darkFavicon": "string"
},
"createdAt": 42.0
}
{
"tenantId": "string",
"id": "string",
"name": "string",
"description": "string",
"customData": {},
"isMfaRequired": true,
"branding": {
"logoUrl": "string",
"darkLogoUrl": "string",
"favicon": "string",
"darkFavicon": "string"
},
"createdAt": 42.0
}
curl \
--request DELETE 'https://[tenant_id].logto.app/api/organizations/{id}' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Remove a role from a user in an organization
Remove a role assignment from a user in the specified organization.
curl \
--request DELETE 'https://[tenant_id].logto.app/api/organizations/{id}/users/{userId}/roles/{organizationRoleId}' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Get organization applications
Get applications associated with the organization.
curl \
--request GET 'https://[tenant_id].logto.app/api/organizations/{id}/applications' \
--header "Authorization: Bearer $ACCESS_TOKEN"
[
{
"tenantId": "string",
"id": "string",
"name": "string",
"secret": "string",
"description": "string",
"type": "Native",
"oidcClientMetadata": {
"redirectUris": [
{}
],
"postLogoutRedirectUris": [
"string"
],
"backchannelLogoutUri": "string",
"backchannelLogoutSessionRequired": true,
"logoUri": "string"
},
"customClientMetadata": {
"corsAllowedOrigins": [
"string"
],
"idTokenTtl": 42.0,
"refreshTokenTtl": 42.0,
"refreshTokenTtlInDays": 42.0,
"tenantId": "string",
"alwaysIssueRefreshToken": true,
"rotateRefreshToken": true
},
"protectedAppMetadata": {
"host": "string",
"origin": "string",
"sessionDuration": 42.0,
"pageRules": [
{
"path": "string"
}
],
"customDomains": [
{
"domain": "string",
"status": "PendingVerification",
"errorMessage": "string",
"dnsRecords": [
{
"name": "string",
"type": "string",
"value": "string"
}
],
"cloudflareData": {
"id": "string",
"status": "string",
"ssl": {
"status": "string",
"validation_errors": [
{
"message": "string"
}
]
},
"verification_errors": [
"string"
]
}
}
]
},
"customData": {},
"isThirdParty": true,
"createdAt": 42.0,
"organizationRoles": [
{
"id": "string",
"name": "string"
}
]
}
]
Replace organization applications
Replace all applications associated with the organization with the given data.
curl \
--request PUT 'https://[tenant_id].logto.app/api/organizations/{id}/applications' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"applicationIds":["string"]}'
{
"applicationIds": [
"string"
]
}
Assign roles to applications in an organization
Assign roles to applications in the specified organization.
Responses
-
Roles were assigned to the applications successfully.
-
Bad Request
-
Unauthorized
-
Forbidden
-
At least one of the IDs provided is not valid. For example, the organization ID, application ID, or organization role ID does not exist; the application is not a member of the organization; or the role type is not assignable to the application.
curl \
--request POST 'https://[tenant_id].logto.app/api/organizations/{id}/applications/roles' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"applicationIds":["string"],"organizationRoleIds":["string"]}'
{
"applicationIds": [
"string"
],
"organizationRoleIds": [
"string"
]
}
Replace organization JIT default roles
Replace all organization roles that will be assigned to users during just-in-time provisioning with the given data.
curl \
--request PUT 'https://[tenant_id].logto.app/api/organizations/{id}/jit/roles' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"organizationRoleIds":["string"]}'
{
"organizationRoleIds": [
"string"
]
}
Add organization JIT default roles
Add new organization roles that will be assigned to users during just-in-time provisioning.
curl \
--request POST 'https://[tenant_id].logto.app/api/organizations/{id}/jit/roles' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"organizationRoleIds":["string"]}'
{
"organizationRoleIds": [
"string"
]
}
Get organization JIT SSO connectors
Get enterprise SSO connectors for just-in-time provisioning of users in the organization.
curl \
--request GET 'https://[tenant_id].logto.app/api/organizations/{id}/jit/sso-connectors' \
--header "Authorization: Bearer $ACCESS_TOKEN"
[
{
"tenantId": "string",
"id": "string",
"providerName": "string",
"connectorName": "string",
"config": {},
"domains": [
"string"
],
"branding": {
"displayName": "string",
"logo": "string",
"darkLogo": "string"
},
"syncProfile": true,
"createdAt": 42.0
}
]
Get API resource scopes
Get scopes (permissions) defined for an API resource.
curl \
--request GET 'https://[tenant_id].logto.app/api/resources/{resourceId}/scopes' \
--header "Authorization: Bearer $ACCESS_TOKEN"
[
{
"tenantId": "string",
"id": "string",
"resourceId": "string",
"name": "string",
"description": "string",
"createdAt": 42.0
}
]
SSO connectors
Endpoints for managing single sign-on (SSO) connectors. Your sign-in experience can use these well-configured SSO connectors to authenticate users and sync user attributes from external identity providers (IdPs).
SSO connectors are created by SSO connector provider factories.