The Trusted Origins API provides operations to manage Trusted Origins and sources.
When external URLs are requested during sign-in, sign-out, or recovery operations, Okta checks those URLs against the allowed list of Trusted Origins. Trusted Origins also enable browser-based applications to access Okta APIs from JavaScript (CORS). If the origins aren't specified, the related operation (redirect or Okta API access) isn't permitted.
You can also configure Trusted Origins to allow iFrame embedding of Okta resources, such as Okta sign-in pages and the Okta End-User Dashboard, within that origin.
Notes:
- This feature is supported for Okta domains only. It isn't currently supported for custom domains.
- Some of the curl code examples on this page include SSWS API token authentication. However, Okta recommends using scoped OAuth 2.0 and OIDC access tokens to authenticate with Okta management APIs. OAuth 2.0 and OIDC access tokens provide fine-grain control over the bearer's actions on specific endpoints. See Okta API authentication methods.
okta.trustedOrigins.read
Lists all trusted origins
q | string A search string that prefix matches against the |
filter | string Filter trusted origins with a supported expression for a subset of properties. You can filter on the following properties: filter=name eq "Example trusted origin" |
after | string After cursor provided by a prior request |
limit | integer <int32> <= 200 Default: 20 Specifies the number of results |
Success
Forbidden
Too Many Requests
[- {
- "id": "tos10hu7rkbtrFt1M0g4",
- "name": "New trusted origin",
- "status": "ACTIVE",
- "scopes": [
- {
- "type": "CORS"
}, - {
- "type": "REDIRECT"
}
], - "created": "2018-01-13T01:11:44.000Z",
- "createdBy": "00ut5t92p6IEOi4bu0g3",
- "lastedUpdated": "2018-01-13T01:11:44.000Z",
- "lastedUpdatedBy": "00ut5t92p6IEOi4bu0g3",
- "_links": {
- "self": {
- "hints": {
- "allow": [
- "GET",
- "PUT",
- "DELETE"
]
}
}, - "deactivate": {
- "hints": {
- "allow": [
- "POST"
]
}
}
}
}
]
okta.trustedOrigins.manage
Creates a trusted origin
Success
Bad Request
Forbidden
Too Many Requests
{- "name": "New trusted origin",
- "scopes": [
- {
- "type": "CORS"
}, - {
- "type": "REDIRECT"
}
]
}
{- "id": "tos10hu7rkbtrFt1M0g4",
- "name": "New trusted origin",
- "status": "ACTIVE",
- "scopes": [
- {
- "type": "CORS"
}, - {
- "type": "REDIRECT"
}
], - "created": "2018-01-13T01:11:44.000Z",
- "createdBy": "00ut5t92p6IEOi4bu0g3",
- "lastedUpdated": "2018-01-13T01:11:44.000Z",
- "lastedUpdatedBy": "00ut5t92p6IEOi4bu0g3",
- "_links": {
- "self": {
- "hints": {
- "allow": [
- "GET",
- "PUT",
- "DELETE"
]
}
}, - "deactivate": {
- "hints": {
- "allow": [
- "POST"
]
}
}
}
}
okta.trustedOrigins.read
Retrieves a trusted origin
Success
Forbidden
Not Found
Too Many Requests
{- "id": "tos10hu7rkbtrFt1M0g4",
- "name": "New trusted origin",
- "status": "ACTIVE",
- "scopes": [
- {
- "type": "CORS"
}, - {
- "type": "REDIRECT"
}
], - "created": "2018-01-13T01:11:44.000Z",
- "createdBy": "00ut5t92p6IEOi4bu0g3",
- "lastedUpdated": "2018-01-13T01:11:44.000Z",
- "lastedUpdatedBy": "00ut5t92p6IEOi4bu0g3",
- "_links": {
- "self": {
- "hints": {
- "allow": [
- "GET",
- "PUT",
- "DELETE"
]
}
}, - "deactivate": {
- "hints": {
- "allow": [
- "POST"
]
}
}
}
}
okta.trustedOrigins.manage
Replaces a trusted origin
createdBy | string The ID of the user who created the trusted origin | ||||
lastUpdatedBy | string The ID of the user who last updated the trusted origin | ||||
name | string (TrustedOriginName) <= 255 Unique name for the trusted origin | ||||
origin | string (TrustedOriginOrigin) <= 255 Unique origin URL for the trusted origin. The supported schemes for this attribute are HTTP, HTTPS, FTP, Ionic 2, and Capacitor. | ||||
Array of objects (TrustedOriginScopes) <= 3 Array of scope types that this trusted origin is used for | |||||
Array
| |||||
status | string (LifecycleStatus) Enum: "ACTIVE" "INACTIVE" |
Success
Bad Request
Forbidden
Not Found
Too Many Requests
{- "value": {
- "id": "tosue7JvguwJ7U6kz0g3",
- "name": "Updated Example trusted origin",
- "scopes": [
- {
- "type": "CORS"
}, - {
- "type": "REDIRECT"
}
], - "status": "ACTIVE",
- "created": "2017-12-16T05:01:12.000Z",
- "createdBy": "00ut5t92p6IEOi4bu0g3",
- "lastUpdated": "2017-12-16T05:01:12.000Z",
- "lastUpdatedBy": "00ut5t92p6IEOi4bu0g3",
- "_links": {
- "self": {
- "hints": {
- "allow": [
- "GET",
- "PUT",
- "DELETE"
]
}
}, - "deactivate": {
- "hints": {
- "allow": [
- "POST"
]
}
}
}
}
}
{- "value": {
- "id": "tosue7JvguwJ7U6kz0g3",
- "name": "Updated Example trusted origin",
- "scopes": [
- {
- "type": "CORS"
}, - {
- "type": "REDIRECT"
}
], - "status": "ACTIVE",
- "created": "2017-12-16T05:01:12.000Z",
- "createdBy": "00ut5t92p6IEOi4bu0g3",
- "lastUpdated": "2017-12-16T05:01:12.000Z",
- "lastUpdatedBy": "00ut5t92p6IEOi4bu0g3",
- "_links": {
- "self": {
- "hints": {
- "allow": [
- "GET",
- "PUT",
- "DELETE"
]
}
}, - "deactivate": {
- "hints": {
- "allow": [
- "POST"
]
}
}
}
}
}
okta.trustedOrigins.manage
Deletes a trusted origin
Success
Forbidden
Not Found
Too Many Requests
{- "errorCode": "E0000006",
- "errorSummary": "You do not have permission to perform the requested action",
- "errorLink": "E0000006",
- "errorId": "sampleNUSD_8fdkFd8fs8SDBK",
- "errorCauses": [ ]
}
okta.trustedOrigins.manage
Activates a trusted origin. Sets the status
to ACTIVE
.
Success
Forbidden
Not Found
Too Many Requests
{- "id": "tos10hu7rkbtrFt1M0g4",
- "name": "New trusted origin",
- "status": "ACTIVE",
- "scopes": [
- {
- "type": "CORS"
}, - {
- "type": "REDIRECT"
}
], - "created": "2018-01-13T01:11:44.000Z",
- "createdBy": "00ut5t92p6IEOi4bu0g3",
- "lastedUpdated": "2018-01-13T01:11:44.000Z",
- "lastedUpdatedBy": "00ut5t92p6IEOi4bu0g3",
- "_links": {
- "self": {
- "hints": {
- "allow": [
- "GET",
- "PUT",
- "DELETE"
]
}
}, - "deactivate": {
- "hints": {
- "allow": [
- "POST"
]
}
}
}
}
okta.trustedOrigins.manage
Deactivates a trusted origin. Sets the status
to INACTIVE
.
Success
Forbidden
Not Found
Too Many Requests
{- "id": "tos10hu7rkbtrFt1M0g4",
- "name": "New trusted origin",
- "status": "INACTIVE",
- "scopes": [
- {
- "type": "CORS"
}, - {
- "type": "REDIRECT"
}
], - "created": "2018-01-13T01:11:44.000Z",
- "createdBy": "00ut5t92p6IEOi4bu0g3",
- "lastedUpdated": "2018-01-13T01:11:44.000Z",
- "lastedUpdatedBy": "00ut5t92p6IEOi4bu0g3",
- "_links": {
- "activate": {
- "hints": {
- "allow": [
- "POST"
]
}
}, - "self": {
- "hints": {
- "allow": [
- "GET",
- "PUT",
- "DELETE"
]
}
}
}
}