Show / Hide Table of Contents

Method CreateAsync

CreateAsync(Uri, String, String, TimeSpan, CancellationToken)

Creates an OAuthApplicationCredential with information needed to access an ArcGIS resource.

Declaration
public static Task<OAuthApplicationCredential> CreateAsync(Uri portalUrl, string clientId, string clientSecret, TimeSpan tokenExpirationInterval = default(TimeSpan), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Uri portalUrl

The URL of the portal to authenticate with.

System.String clientId

A unique identifier associated with an application registered with the portal that assists with client/server OAuth authentication.

System.String clientSecret

A private key that verifies the application is authorized to access the registered service.

System.TimeSpan tokenExpirationInterval

The duration the token will remain valid, represented in minutes. The value must be at least 1 minute, otherwise the server default is used.

System.Threading.CancellationToken cancellationToken

Cancellation token

Returns
Type Description
System.Threading.Tasks.Task<OAuthApplicationCredential>

Returns an OAuthApplicationCredential.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.5 - 200.7
.NET200.5 - 200.7
.NET Windows200.5 - 200.7
.NET Android200.5 - 200.7
.NET iOS200.5 - 200.7
.NET Framework200.5 - 200.7
UWP200.5 - 200.7
In This Article
Back to top Copyright © 2022 Esri.