DELETE /v1/organizations/{organizationId}/oauth/clients/{clientId}/secret
Stops every secret of the app now, including one still in its grace period.
- TypeScript
- Python
- Rust
- Go
TypeScript
photon.organizations.deleteOrganizationOauthClientSecret(input: DeleteOrganizationOauthClientSecretInput, options?: RequestOptions): Promise<DeleteOrganizationOauthClientSecretOutput>
Python
photon.organizations.delete_organization_oauth_client_secret(input: DeleteOrganizationOauthClientSecretInput) -> None
Rust
client.delete_organization_oauth_client_secret(organization_id: String, client_id: String).await -> Result<ResponseValue<()>, Error<DeleteOrganizationOauthClientSecretError>>
Go
client.Organizations.DeleteOrganizationOauthClientSecret(ctx context.Context, params *DeleteOrganizationOauthClientSecretParams, opts ...RequestOption) error
import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
await photon.organizations.deleteOrganizationOauthClientSecret({
path: {
organizationId: "organizationId",
clientId: "clientId",
},
});
import os
from photon_api import Photon
from photon_api.rpc_generated import DeleteOrganizationOauthClientSecretInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
photon.organizations.delete_organization_oauth_client_secret(
DeleteOrganizationOauthClientSecretInput.model_validate({
"path": {
"organizationId": "organizationId",
"clientId": "clientId",
},
})
)
use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};
let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
.credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
.build()?;
client
.delete_organization_oauth_client_secret("organizationId".to_owned(), "clientId".to_owned())
.await
.map_err(|error| format!("{error:?}"))?;
import (
"context"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
err := client.Organizations.DeleteOrganizationOauthClientSecret(ctx, &photonapi.DeleteOrganizationOauthClientSecretParams{
OrganizationID: "organizationId",
ClientID: "clientId",
})
if err != nil {
return err
}
Parameters
string
required
string
required
Returns
204 The app has no secret. No body.