Table of Contents

Method GetGuildById

Namespace
GuildWars2.Guilds
Assembly
GW2SDK.dll

GetGuildById(string, string?, MissingMemberBehavior, CancellationToken)

Retrieves a guild by its ID. This endpoint is only accessible with a valid access token and the associated account must be a member of the guild.

public Task<(Guild Value, MessageContext Context)> GetGuildById(string guildId, string? accessToken, MissingMemberBehavior missingMemberBehavior = MissingMemberBehavior.Error, CancellationToken cancellationToken = default)

Parameters

guildId string

The guild ID.

accessToken string

An API key or subtoken.

missingMemberBehavior MissingMemberBehavior

The desired behavior when JSON contains unexpected members.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<(Guild Value, MessageContext Context)>

A task that represents the API request.