Skip to main content
OAuth Apps is a way for third party applications to access Confidence on behalf of a user. With an OAuth App you can for example develop your own application that can access Confidence.

Create an OAuth App

To create an OAuth App you can pass a name, description and callback URLs.
curl -X POST "https://api.confidence.dev/v1/oauthApps" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "displayName": "My OAuth App",
    "description": "Test app",
    "logoUri": "https://confidence.spotify.com/logo.png",
    "allowedCallbackUrls": [
      "https://confidence.spotify.com"
    ],
    "allowedLogoutUrls": [
      "https://confidence.spotify.com"
    ],
    "allowedWebOrigins": [
      "https://confidence.spotify.com",
      "http://localhost:3000"
    ]
  }'
Response:
{
  "name": "oauthApps/vkq6qw3qp6nbefxgbkr0",
  "displayName": "My OAuth App",
  "clientId": "vrBQfwAz8qesNWE84BAImPzCnkAhql7u",
  "clientSecret": "PWySgGDYi5gnxCRTNEI29UFalrlF_m2fhZOiiEw_YFVeCxoPHeQlE5m4kid-WtNB",
  "description": "Test app",
  "logoUri": "https://confidence.spotify.com/logo.png",
  "allowedCallbackUrls": [
    "https://confidence.spotify.com"
  ],
  "allowedLogoutUrls": [
    "https://confidence.spotify.com"
  ],
  "allowedWebOrigins": [
    "https://confidence.spotify.com",
    "http://localhost:3000"
  ],
  "createdBy": "users/xa8cecs2cc9xsz8jvgmc",
  "updatedBy": "users/xa8cecs2cc9xsz8jvgmc",
  "labels": {},
  "createTime": "2023-08-31T11:25:11.536748Z",
  "updateTime": "2023-08-31T11:25:11.536748Z"
}
After you’ve created the OAuth App, you receive a clientId and clientSecret that you can use to get an access token from the OAuth API found at https://auth.confidence.dev/oauth/token. You may only use one of the following grant types: implicit, authorization_code or refresh_token. For more information on the specific grant types go to the Auth0 grant types guide and how to get access tokens in the Auth0 access token guide.

Get an OAuth App

You can get an OAuth App by passing the name of the app to the following endpoint.
curl -X GET "https://api.confidence.dev/v1/oauthApps/vkq6qw3qp6nbefxgbkr0" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response:
{
  "name": "oauthApps/vkq6qw3qp6nbefxgbkr0",
  "displayName": "My OAuth App",
  "clientId": "vrBQfwAz8qesNWE84BAImPzCnkAhql7u",
  "clientSecret": "PWySgGDYi5gnxCRTNEI29UFalrlF_m2fhZOiiEw_YFVeCxoPHeQlE5m4kid-WtNB",
  "description": "Test app",
  "logoUri": "https://confidence.spotify.com/logo.png",
  "allowedCallbackUrls": [
    "https://confidence.spotify.com"
  ],
  "allowedLogoutUrls": [
    "https://confidence.spotify.com"
  ],
  "allowedWebOrigins": [
    "https://confidence.spotify.com",
    "http://localhost:3000"
  ],
  "createdBy": "users/xa8cecs2cc9xsz8jvgmc",
  "updatedBy": "users/xa8cecs2cc9xsz8jvgmc",
  "labels": {},
  "createTime": "2023-08-31T11:25:11.536748Z",
  "updateTime": "2023-08-31T11:25:11.536748Z"
}

Delete an OAuth App

You can delete an OAuth app by calling the delete endpoint. Deleting doesn’t delete any already issued access tokens.
curl -X DELETE "https://api.confidence.dev/v1/oauthApps/vkq6qw3qp6nbefxgbkr0" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"