# Class ChannelCredentials (2.66.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.66.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ChannelCredentials)
- [2.63.0](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/2.63.0/Grpc.Core.ChannelCredentials)
- [2.48.0](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/2.48.0/Grpc.Core.ChannelCredentials)

    public abstract class ChannelCredentials

Client-side channel credentials. Used for creation of a secure channel.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ChannelCredentials

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[SslCredentials](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.SslCredentials)

## Namespace

[Grpc.Core](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core)

## Assembly

Grpc.Core.Api.dll

## Constructors

### ChannelCredentials()

    public ChannelCredentials()

Creates a new instance of channel credentials

## Properties

### Insecure

    public static ChannelCredentials Insecure { get; }

Returns instance of credentials that provides no security and
will result in creating an unsecure channel with no encryption whatsoever.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ChannelCredentials` |   |

### SecureSsl

    public static ChannelCredentials SecureSsl { get; }

Returns instance of credentials that provides SSL security.


These credentials are the same as creating [SslCredentials](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.SslCredentials) without parameters.
Apps that are using Grpc.Core can create [SslCredentials](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.SslCredentials) directly to customize
the secure SSL credentials.

<br />

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ChannelCredentials` |   |

## Methods

### Create(ChannelCredentials, CallCredentials)

    public static ChannelCredentials Create(ChannelCredentials channelCredentials, CallCredentials callCredentials)

Creates a new instance of `ChannelCredentials` class by composing
given channel credentials with call credentials.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `channelCredentials` | `https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ChannelCredentials` Channel credentials. |
| `callCredentials` | `https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallCredentials` Call credentials. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ChannelCredentials` | The new composite `ChannelCredentials` |

### InternalPopulateConfiguration(ChannelCredentialsConfiguratorBase, object)

    public abstract void InternalPopulateConfiguration(ChannelCredentialsConfiguratorBase configurator, object state)

Populates channel credentials configurator with this instance's configuration.
End users never need to invoke this method as it is part of internal implementation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `configurator` | `https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ChannelCredentialsConfiguratorBase` |
| `state` | `https://learn.microsoft.com/dotnet/api/system.object` |