Imgur.API.Endpoints.Impl.AccountEndpoint.SendVerificationEmailAsync C# (CSharp) Method

SendVerificationEmailAsync() public method

Sends an email to the user to verify that their email is valid to upload to gallery. OAuth authentication required.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public SendVerificationEmailAsync ( ) : Task
return Task
        public async Task<bool> SendVerificationEmailAsync()
        {
            if (ApiClient.OAuth2Token == null)
                throw new ArgumentNullException(nameof(ApiClient.OAuth2Token), OAuth2RequiredExceptionMessage);

            var url = "account/me/verifyemail";

            using (var request = RequestBuilder.CreateRequest(HttpMethod.Post, url))
            {
                var verified = await SendRequestAsync<bool>(request).ConfigureAwait(false);
                return verified;
            }
        }

Usage Example

        public async Task SendVerificationEmailAsync_IsTrue()
        {
            var client = new MashapeClient(ClientId, ClientSecret, MashapeKey, OAuth2Token);
            var endpoint = new AccountEndpoint(client);

            await endpoint.SendVerificationEmailAsync();
        }
All Usage Examples Of Imgur.API.Endpoints.Impl.AccountEndpoint::SendVerificationEmailAsync