The OAuth2 client API allows you to register a LaunchDarkly OAuth client for use in your own custom integrations. Registering a LaunchDarkly OAuth client allows you to use LaunchDarkly as an identity provider so that account members can log into your application with their LaunchDarkly account.
You can create and manage LaunchDarkly OAuth clients using the LaunchDarkly OAuth client API. This API acknowledges creation of your client with a response containing a one-time, unique _clientSecret
. If you lose your client secret, you will have to register a new client. LaunchDarkly does not store client secrets in plain text.
Several of the endpoints in the OAuth2 client API require an OAuth client ID. The OAuth client ID is returned as part of the Create a LaunchDarkly OAuth 2.0 client and Get clients responses. It is the _clientId
field, or the _clientId
field of each element in the items
array.
You must have Admin privileges or an access token created by a member with Admin privileges in order to be able to use this feature.
Please note that redirectUri
s must be absolute URIs that conform to the https URI scheme. If you wish to register a client with a different URI scheme, please contact LaunchDarkly Support.
Get all OAuth 2.0 clients registered by your account.
OAuth 2.0 client collection response
Invalid request
Invalid access token
Forbidden
{- "_links": {
- "self": {
- "href": "/api/v2/oauth/clients",
- "type": "application/json"
}
}, - "items": [
- {
- "_links": {
- "parent": {
- "href": "/api/v2/oauth/clients",
- "type": "application/json"
}, - "self": {
- "href": "/api/v2/oauth/clients/50666563-9144-4125-b822-33f308227e45",
- "type": "application/json"
}
}, - "name": "string",
- "description": "string",
- "_accountId": "string",
- "_clientId": "string",
- "_clientSecret": "string",
- "redirectUri": "string",
- "_creationDate": 0
}
]
}
Create (register) a LaunchDarkly OAuth2 client. OAuth2 clients allow you to build custom integrations using LaunchDarkly as your identity provider.
OAuth 2.0 client response
Invalid request
Invalid access token
Forbidden
{- "name": "string",
- "redirectUri": "string",
- "description": "string"
}
{- "_links": {
- "parent": {
- "href": "/api/v2/oauth/clients",
- "type": "application/json"
}, - "self": {
- "href": "/api/v2/oauth/clients/50666563-9144-4125-b822-33f308227e45",
- "type": "application/json"
}
}, - "name": "string",
- "description": "string",
- "_accountId": "string",
- "_clientId": "string",
- "_clientSecret": "string",
- "redirectUri": "string",
- "_creationDate": 0
}
Get a registered OAuth 2.0 client by unique client ID.
OAuth 2.0 client response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
{- "_links": {
- "parent": {
- "href": "/api/v2/oauth/clients",
- "type": "application/json"
}, - "self": {
- "href": "/api/v2/oauth/clients/50666563-9144-4125-b822-33f308227e45",
- "type": "application/json"
}
}, - "name": "string",
- "description": "string",
- "_accountId": "string",
- "_clientId": "string",
- "_clientSecret": "string",
- "redirectUri": "string",
- "_creationDate": 0
}
Patch an existing OAuth 2.0 client by client ID. Updating an OAuth2 client uses a JSON patch representation of the desired changes. To learn more, read Updates. Only name
, description
, and redirectUri
may be patched.
OAuth 2.0 client response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
[- {
- "op": "replace",
- "path": "/name",
- "value": "Example Client V2"
}
]
{- "_links": {
- "parent": {
- "href": "/api/v2/oauth/clients",
- "type": "application/json"
}, - "self": {
- "href": "/api/v2/oauth/clients/50666563-9144-4125-b822-33f308227e45",
- "type": "application/json"
}
}, - "name": "string",
- "description": "string",
- "_accountId": "string",
- "_clientId": "string",
- "_clientSecret": "string",
- "redirectUri": "string",
- "_creationDate": 0
}
Delete an existing OAuth 2.0 client by unique client ID.
Action succeeded
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
{- "code": "invalid_request",
- "message": "Invalid request body"
}