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.
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.
This feature is in beta
To use this feature, pass in a header including the
LD-API-Version
key with value set tobeta
. Use this header with each call. To learn more, read Beta resources.
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
curl -i -X GET \ https://app.launchdarkly.com/api/v2/oauth/clients \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "_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.
Successful OAuth 2.0 client creation 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
curl -i -X GET \ 'https://app.launchdarkly.com/api/v2/oauth/clients/{clientId}' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "_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. Requires a JSON Patch representation of the desired changes to the client. Only name
, description
, and redirectUri
may be patched.
op required | string The type of operation to perform |
path required | string A JSON Pointer string specifying the part of the document to operate on |
value required | any A JSON value used in "add", "replace", and "test" operations |
Successful
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
curl -i -X DELETE \ 'https://app.launchdarkly.com/api/v2/oauth/clients/{clientId}' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "code": "invalid_request",
- "message": "Invalid request body"
}