1. Packages
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. getOauthClient
Viewing docs for Cloudflare v6.18.0
published on Thursday, Jul 16, 2026 by Pulumi
cloudflare logo
Viewing docs for Cloudflare v6.18.0
published on Thursday, Jul 16, 2026 by Pulumi

    Accepted Permissions

    • OAuth Client Read

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleOauthClient = cloudflare.getOauthClient({
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        oauthClientId: "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_oauth_client = cloudflare.get_oauth_client(account_id="023e105f4ecef8ad9ca31a8372d0c353",
        oauth_client_id="a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.GetOauthClient(ctx, &cloudflare.LookupOauthClientArgs{
    			AccountId:     "023e105f4ecef8ad9ca31a8372d0c353",
    			OauthClientId: "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleOauthClient = Cloudflare.GetOauthClient.Invoke(new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            OauthClientId = "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.CloudflareFunctions;
    import com.pulumi.cloudflare.inputs.GetOauthClientArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var exampleOauthClient = CloudflareFunctions.getOauthClient(GetOauthClientArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .oauthClientId("a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4")
                .build());
    
        }
    }
    
    variables:
      exampleOauthClient:
        fn::invoke:
          function: cloudflare:getOauthClient
          arguments:
            accountId: 023e105f4ecef8ad9ca31a8372d0c353
            oauthClientId: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4
    
    pulumi {
      required_providers {
        cloudflare = {
          source = "pulumi/cloudflare"
        }
      }
    }
    
    data "cloudflare_getoauthclient" "exampleOauthClient" {
      account_id      = "023e105f4ecef8ad9ca31a8372d0c353"
      oauth_client_id = "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
    }
    

    Using getOauthClient

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getOauthClient(args: GetOauthClientArgs, opts?: InvokeOptions): Promise<GetOauthClientResult>
    function getOauthClientOutput(args: GetOauthClientOutputArgs, opts?: InvokeOptions): Output<GetOauthClientResult>
    def get_oauth_client(account_id: Optional[str] = None,
                         oauth_client_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetOauthClientResult
    def get_oauth_client_output(account_id: pulumi.Input[Optional[str]] = None,
                         oauth_client_id: pulumi.Input[Optional[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetOauthClientResult]
    func LookupOauthClient(ctx *Context, args *LookupOauthClientArgs, opts ...InvokeOption) (*LookupOauthClientResult, error)
    func LookupOauthClientOutput(ctx *Context, args *LookupOauthClientOutputArgs, opts ...InvokeOption) LookupOauthClientResultOutput

    > Note: This function is named LookupOauthClient in the Go SDK.

    public static class GetOauthClient 
    {
        public static Task<GetOauthClientResult> InvokeAsync(GetOauthClientArgs args, InvokeOptions? opts = null)
        public static Output<GetOauthClientResult> Invoke(GetOauthClientInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOauthClientResult> getOauthClient(GetOauthClientArgs args, InvokeOptions options)
    public static Output<GetOauthClientResult> getOauthClient(GetOauthClientArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getOauthClient:getOauthClient
      arguments:
        # arguments dictionary
    data "cloudflare_get_oauth_client" "name" {
        # arguments
    }

    The following arguments are supported:

    AccountId string
    Account identifier tag.
    OauthClientId string
    The unique identifier for an OAuth client.
    AccountId string
    Account identifier tag.
    OauthClientId string
    The unique identifier for an OAuth client.
    account_id string
    Account identifier tag.
    oauth_client_id string
    The unique identifier for an OAuth client.
    accountId String
    Account identifier tag.
    oauthClientId String
    The unique identifier for an OAuth client.
    accountId string
    Account identifier tag.
    oauthClientId string
    The unique identifier for an OAuth client.
    account_id str
    Account identifier tag.
    oauth_client_id str
    The unique identifier for an OAuth client.
    accountId String
    Account identifier tag.
    oauthClientId String
    The unique identifier for an OAuth client.

    getOauthClient Result

    The following output properties are available:

    AccountId string
    Account identifier tag.
    AllowedCorsOrigins List<string>
    Array of allowed CORS origins.
    ClientId string
    The unique identifier for an OAuth client.
    ClientName string
    Human-readable name of the OAuth client.
    ClientUri string
    URL of the home page of the client.
    ClientUriVerification GetOauthClientClientUriVerification
    Client URI domain control verification state.
    CreatedAt string
    Timestamp when the OAuth client was created.
    GrantTypes List<string>
    Array of OAuth grant types the client is allowed to use. authorizationCode is required; refreshToken may be included optionally.
    HasRotatedSecret bool
    Indicates whether the client has a rotated secret that has not yet been deleted.
    Id string
    The provider-assigned unique ID for this managed resource.
    LogoUri string
    URL of the client's logo.
    OauthClientId string
    The unique identifier for an OAuth client.
    PolicyUri string
    URL that points to a privacy policy document.
    PostLogoutRedirectUris List<string>
    Array of allowed post-logout redirect URIs.
    PromotedAt string
    Timestamp when the OAuth client was promoted to public visibility.
    RedirectUris List<string>
    Array of allowed redirect URIs for the client.
    ResponseTypes List<string>
    Array of OAuth response types the client is allowed to use.
    Scopes List<string>
    Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes offlineAccess and openid are added or removed automatically based on grantTypes and responseTypes.
    TokenEndpointAuthMethod string
    The authentication method the client uses at the token endpoint. Available values: "none", "clientsecretbasic", "clientsecretpost".
    TosUri string
    URL that points to a terms of service document.
    UpdatedAt string
    Timestamp when the OAuth client was last updated.
    Visibility string
    Visibility of the OAuth client. Available values: "public", "private".
    AccountId string
    Account identifier tag.
    AllowedCorsOrigins []string
    Array of allowed CORS origins.
    ClientId string
    The unique identifier for an OAuth client.
    ClientName string
    Human-readable name of the OAuth client.
    ClientUri string
    URL of the home page of the client.
    ClientUriVerification GetOauthClientClientUriVerification
    Client URI domain control verification state.
    CreatedAt string
    Timestamp when the OAuth client was created.
    GrantTypes []string
    Array of OAuth grant types the client is allowed to use. authorizationCode is required; refreshToken may be included optionally.
    HasRotatedSecret bool
    Indicates whether the client has a rotated secret that has not yet been deleted.
    Id string
    The provider-assigned unique ID for this managed resource.
    LogoUri string
    URL of the client's logo.
    OauthClientId string
    The unique identifier for an OAuth client.
    PolicyUri string
    URL that points to a privacy policy document.
    PostLogoutRedirectUris []string
    Array of allowed post-logout redirect URIs.
    PromotedAt string
    Timestamp when the OAuth client was promoted to public visibility.
    RedirectUris []string
    Array of allowed redirect URIs for the client.
    ResponseTypes []string
    Array of OAuth response types the client is allowed to use.
    Scopes []string
    Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes offlineAccess and openid are added or removed automatically based on grantTypes and responseTypes.
    TokenEndpointAuthMethod string
    The authentication method the client uses at the token endpoint. Available values: "none", "clientsecretbasic", "clientsecretpost".
    TosUri string
    URL that points to a terms of service document.
    UpdatedAt string
    Timestamp when the OAuth client was last updated.
    Visibility string
    Visibility of the OAuth client. Available values: "public", "private".
    account_id string
    Account identifier tag.
    allowed_cors_origins list(string)
    Array of allowed CORS origins.
    client_id string
    The unique identifier for an OAuth client.
    client_name string
    Human-readable name of the OAuth client.
    client_uri string
    URL of the home page of the client.
    client_uri_verification object
    Client URI domain control verification state.
    created_at string
    Timestamp when the OAuth client was created.
    grant_types list(string)
    Array of OAuth grant types the client is allowed to use. authorizationCode is required; refreshToken may be included optionally.
    has_rotated_secret bool
    Indicates whether the client has a rotated secret that has not yet been deleted.
    id string
    The provider-assigned unique ID for this managed resource.
    logo_uri string
    URL of the client's logo.
    oauth_client_id string
    The unique identifier for an OAuth client.
    policy_uri string
    URL that points to a privacy policy document.
    post_logout_redirect_uris list(string)
    Array of allowed post-logout redirect URIs.
    string
    Timestamp when the OAuth client was promoted to public visibility.
    redirect_uris list(string)
    Array of allowed redirect URIs for the client.
    response_types list(string)
    Array of OAuth response types the client is allowed to use.
    scopes list(string)
    Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes offlineAccess and openid are added or removed automatically based on grantTypes and responseTypes.
    token_endpoint_auth_method string
    The authentication method the client uses at the token endpoint. Available values: "none", "clientsecretbasic", "clientsecretpost".
    tos_uri string
    URL that points to a terms of service document.
    updated_at string
    Timestamp when the OAuth client was last updated.
    visibility string
    Visibility of the OAuth client. Available values: "public", "private".
    accountId String
    Account identifier tag.
    allowedCorsOrigins List<String>
    Array of allowed CORS origins.
    clientId String
    The unique identifier for an OAuth client.
    clientName String
    Human-readable name of the OAuth client.
    clientUri String
    URL of the home page of the client.
    clientUriVerification GetOauthClientClientUriVerification
    Client URI domain control verification state.
    createdAt String
    Timestamp when the OAuth client was created.
    grantTypes List<String>
    Array of OAuth grant types the client is allowed to use. authorizationCode is required; refreshToken may be included optionally.
    hasRotatedSecret Boolean
    Indicates whether the client has a rotated secret that has not yet been deleted.
    id String
    The provider-assigned unique ID for this managed resource.
    logoUri String
    URL of the client's logo.
    oauthClientId String
    The unique identifier for an OAuth client.
    policyUri String
    URL that points to a privacy policy document.
    postLogoutRedirectUris List<String>
    Array of allowed post-logout redirect URIs.
    promotedAt String
    Timestamp when the OAuth client was promoted to public visibility.
    redirectUris List<String>
    Array of allowed redirect URIs for the client.
    responseTypes List<String>
    Array of OAuth response types the client is allowed to use.
    scopes List<String>
    Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes offlineAccess and openid are added or removed automatically based on grantTypes and responseTypes.
    tokenEndpointAuthMethod String
    The authentication method the client uses at the token endpoint. Available values: "none", "clientsecretbasic", "clientsecretpost".
    tosUri String
    URL that points to a terms of service document.
    updatedAt String
    Timestamp when the OAuth client was last updated.
    visibility String
    Visibility of the OAuth client. Available values: "public", "private".
    accountId string
    Account identifier tag.
    allowedCorsOrigins string[]
    Array of allowed CORS origins.
    clientId string
    The unique identifier for an OAuth client.
    clientName string
    Human-readable name of the OAuth client.
    clientUri string
    URL of the home page of the client.
    clientUriVerification GetOauthClientClientUriVerification
    Client URI domain control verification state.
    createdAt string
    Timestamp when the OAuth client was created.
    grantTypes string[]
    Array of OAuth grant types the client is allowed to use. authorizationCode is required; refreshToken may be included optionally.
    hasRotatedSecret boolean
    Indicates whether the client has a rotated secret that has not yet been deleted.
    id string
    The provider-assigned unique ID for this managed resource.
    logoUri string
    URL of the client's logo.
    oauthClientId string
    The unique identifier for an OAuth client.
    policyUri string
    URL that points to a privacy policy document.
    postLogoutRedirectUris string[]
    Array of allowed post-logout redirect URIs.
    promotedAt string
    Timestamp when the OAuth client was promoted to public visibility.
    redirectUris string[]
    Array of allowed redirect URIs for the client.
    responseTypes string[]
    Array of OAuth response types the client is allowed to use.
    scopes string[]
    Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes offlineAccess and openid are added or removed automatically based on grantTypes and responseTypes.
    tokenEndpointAuthMethod string
    The authentication method the client uses at the token endpoint. Available values: "none", "clientsecretbasic", "clientsecretpost".
    tosUri string
    URL that points to a terms of service document.
    updatedAt string
    Timestamp when the OAuth client was last updated.
    visibility string
    Visibility of the OAuth client. Available values: "public", "private".
    account_id str
    Account identifier tag.
    allowed_cors_origins Sequence[str]
    Array of allowed CORS origins.
    client_id str
    The unique identifier for an OAuth client.
    client_name str
    Human-readable name of the OAuth client.
    client_uri str
    URL of the home page of the client.
    client_uri_verification GetOauthClientClientUriVerification
    Client URI domain control verification state.
    created_at str
    Timestamp when the OAuth client was created.
    grant_types Sequence[str]
    Array of OAuth grant types the client is allowed to use. authorizationCode is required; refreshToken may be included optionally.
    has_rotated_secret bool
    Indicates whether the client has a rotated secret that has not yet been deleted.
    id str
    The provider-assigned unique ID for this managed resource.
    logo_uri str
    URL of the client's logo.
    oauth_client_id str
    The unique identifier for an OAuth client.
    policy_uri str
    URL that points to a privacy policy document.
    post_logout_redirect_uris Sequence[str]
    Array of allowed post-logout redirect URIs.
    str
    Timestamp when the OAuth client was promoted to public visibility.
    redirect_uris Sequence[str]
    Array of allowed redirect URIs for the client.
    response_types Sequence[str]
    Array of OAuth response types the client is allowed to use.
    scopes Sequence[str]
    Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes offlineAccess and openid are added or removed automatically based on grantTypes and responseTypes.
    token_endpoint_auth_method str
    The authentication method the client uses at the token endpoint. Available values: "none", "clientsecretbasic", "clientsecretpost".
    tos_uri str
    URL that points to a terms of service document.
    updated_at str
    Timestamp when the OAuth client was last updated.
    visibility str
    Visibility of the OAuth client. Available values: "public", "private".
    accountId String
    Account identifier tag.
    allowedCorsOrigins List<String>
    Array of allowed CORS origins.
    clientId String
    The unique identifier for an OAuth client.
    clientName String
    Human-readable name of the OAuth client.
    clientUri String
    URL of the home page of the client.
    clientUriVerification Property Map
    Client URI domain control verification state.
    createdAt String
    Timestamp when the OAuth client was created.
    grantTypes List<String>
    Array of OAuth grant types the client is allowed to use. authorizationCode is required; refreshToken may be included optionally.
    hasRotatedSecret Boolean
    Indicates whether the client has a rotated secret that has not yet been deleted.
    id String
    The provider-assigned unique ID for this managed resource.
    logoUri String
    URL of the client's logo.
    oauthClientId String
    The unique identifier for an OAuth client.
    policyUri String
    URL that points to a privacy policy document.
    postLogoutRedirectUris List<String>
    Array of allowed post-logout redirect URIs.
    promotedAt String
    Timestamp when the OAuth client was promoted to public visibility.
    redirectUris List<String>
    Array of allowed redirect URIs for the client.
    responseTypes List<String>
    Array of OAuth response types the client is allowed to use.
    scopes List<String>
    Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes offlineAccess and openid are added or removed automatically based on grantTypes and responseTypes.
    tokenEndpointAuthMethod String
    The authentication method the client uses at the token endpoint. Available values: "none", "clientsecretbasic", "clientsecretpost".
    tosUri String
    URL that points to a terms of service document.
    updatedAt String
    Timestamp when the OAuth client was last updated.
    visibility String
    Visibility of the OAuth client. Available values: "public", "private".

    Supporting Types

    GetOauthClientClientUriVerification

    Status string
    Current verification status for the client URI host. Available values: "pending", "inProgress", "verified", "failed".
    Text string
    Exact TXT record value that must be added to DNS to prove ownership of the client URI host.
    Status string
    Current verification status for the client URI host. Available values: "pending", "inProgress", "verified", "failed".
    Text string
    Exact TXT record value that must be added to DNS to prove ownership of the client URI host.
    status string
    Current verification status for the client URI host. Available values: "pending", "inProgress", "verified", "failed".
    text string
    Exact TXT record value that must be added to DNS to prove ownership of the client URI host.
    status String
    Current verification status for the client URI host. Available values: "pending", "inProgress", "verified", "failed".
    text String
    Exact TXT record value that must be added to DNS to prove ownership of the client URI host.
    status string
    Current verification status for the client URI host. Available values: "pending", "inProgress", "verified", "failed".
    text string
    Exact TXT record value that must be added to DNS to prove ownership of the client URI host.
    status str
    Current verification status for the client URI host. Available values: "pending", "inProgress", "verified", "failed".
    text str
    Exact TXT record value that must be added to DNS to prove ownership of the client URI host.
    status String
    Current verification status for the client URI host. Available values: "pending", "inProgress", "verified", "failed".
    text String
    Exact TXT record value that must be added to DNS to prove ownership of the client URI host.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Viewing docs for Cloudflare v6.18.0
    published on Thursday, Jul 16, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial