GET /v1/organizations/{organizationId}/oauth/clients/{clientId}/secret
- TypeScript
- Python
- Rust
- Go
TypeScript
photon.organizations.getOrganizationOauthClientSecret(input: GetOrganizationOauthClientSecretInput, options?: RequestOptions): Promise<GetOrganizationOauthClientSecretOutput>
Python
photon.organizations.get_organization_oauth_client_secret(input: GetOrganizationOauthClientSecretInput) -> models.GetOrganizationOauthClientSecretResponse
Rust
client.get_organization_oauth_client_secret(organization_id: String, client_id: String).await -> Result<ResponseValue<types::GetOrganizationOauthClientSecretResponse>, Error<GetOrganizationOauthClientSecretError>>
Go
client.Organizations.GetOrganizationOauthClientSecret(ctx context.Context, params *GetOrganizationOauthClientSecretParams, opts ...RequestOption) (*GetOrganizationOauthClientSecretResponse, error)
import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.organizations.getOrganizationOauthClientSecret({
path: {
organizationId: "organizationId",
clientId: "clientId",
},
});
import os
from photon_api import Photon
from photon_api.rpc_generated import GetOrganizationOauthClientSecretInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.organizations.get_organization_oauth_client_secret(
GetOrganizationOauthClientSecretInput.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()?;
let result = client
.get_organization_oauth_client_secret("organizationId".to_owned(), "clientId".to_owned())
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();
import (
"context"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
result, err := client.Organizations.GetOrganizationOauthClientSecret(ctx, &photonapi.GetOrganizationOauthClientSecretParams{
OrganizationID: "organizationId",
ClientID: "clientId",
})
if err != nil {
return err
}
_ = result
{
"current": null,
"previous": null
}
Parameters
string
required
string
required
Returns
200 Secret metadata; plaintext is never returned. GetOrganizationOauthClientSecretResponse
GetOrganizationOauthClientSecretResponseCurrent | null
required
GetOrganizationOauthClientSecretResponsePrevious | null
required