POST
/
public
/
v1
/
query
/
list_oauth2_credentials
Authorizations
Body
Unique identifier for a given Organization.
Response
A successful response returns the following fields:oauth2Credentials field
Show oauth2Credentials details
Show oauth2Credentials details
Unique identifier for a given OAuth 2.0 Credential.
provider fieldEnum options:
OAUTH2_PROVIDER_X, OAUTH2_PROVIDER_DISCORDThe encrypted client secret for a given OAuth 2.0 Credential encrypted to the TLS Fetcher quorum key.
curl --request POST \
--url https://api.turnkey.com/public/v1/query/list_oauth2_credentials \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <string> (see Authorizations)" \
--data '{
"organizationId": "<string>"
}'
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().listOauth2Credentials({
organizationId: "<string> (Unique identifier for a given Organization.)"
});
{
"oauth2Credentials": [
{
"oauth2CredentialId": "<string>",
"organizationId": "<string>",
"provider": "<OAUTH2_PROVIDER_X>",
"clientId": "<string>",
"encryptedClientSecret": "<string>",
"createdAt": {
"seconds": "<string>",
"nanos": "<string>"
},
"updatedAt": {
"seconds": "<string>",
"nanos": "<string>"
}
}
]
}