Skip to main content

ResQ.Storage.PinataClient

PinataClient.GetGatewayUrl(string) Method

Gets the gateway URL for accessing content by CID.
public string GetGatewayUrl(string cid);

Parameters

cid System.String The IPFS Content Identifier. Implements GetGatewayUrl(string)

Returns

System.String
The full URL to access the content through the configured gateway.

Exceptions

System.ArgumentNullException
Thrown when cid is null or empty.

Example

var gatewayUrl = storage.GetGatewayUrl("Qmabc123...");
Console.WriteLine($"Access at: {gatewayUrl}");
// Output: https://gateway.pinata.cloud/ipfs/Qmabc123...

Remarks

The returned URL can be used in web browsers or HTTP clients to retrieve the content. The gateway URL is constructed from the configured GatewayUrl.