Object
ApiOAuth2ClientCredentialsAuthentication
The OAuth2 Client Credentials authentication scheme.
Fields
client_authentication_method():
OAuth2ClientAuthenticationMethod
The client authentication method.
client_id():
String
The OAuth2 client ID.
client_secret():
String
The OAuth2 client secret.
has_missing_credentials():
Boolean!
A flag to indicate if this authentication scheme has missing credentials.
label():
String!
The unique authentication scheme label.
missing_credential_fields():
[String!]!
List of credential field names that are missing (e.g., "client_id", "client_secret", "token_url").
parameters():
[OAuth2Parameter!]
OAuth2 parameters (e.g., scope).
refresh_interval_seconds():
Int!
Token refresh interval in seconds.
token_url():
String
The OAuth2 token endpoint URL.
type():
ApiAuthenticationType!
The OAuth2 authentication scheme type (OAUTH2_CLIENT_CREDENTIALS).
was_detected():
Boolean
A flag to show that this authentication scheme was detected from parsing an API definition file.
Example
Query
query GetSiteWithOAuth2Auth($site_id: ID!) {
site(id: $site_id) {
api_definitions {
authentications {
... on ApiOAuth2ClientCredentialsAuthentication {
id
name
token_endpoint
scope
client_authentication_method
custom_parameters {
name
value
}
}
}
}
}
}
Variables
{
"site_id": "42"
}
Result
{
"data": {
"site": {
"api_definitions": [
{
"authentications": [
{
"id": "1",
"name": "OAuth2 Client Credentials",
"token_endpoint": "https://api.example.com/oauth/token",
"scope": "read write",
"client_authentication_method": "client_secret_post",
"custom_parameters": [
{
"name": "resource",
"value": "https://api.example.com"
}
]
}
]
}
]
}
}
}