![OAuth credentials DEV](/documentation/static/c996a8b10b5152f8ebbb797705e62e7a/4cdf7/oauth-credentials-DEV.png)
OAuth credentials are an item used to support authentication workflows. They are required to implement user authentication and app authentication using OAuth 2.0 workflows.
Most user authentication flows require a valid client_
from a set of OAuth credentials. They also require a redirect URI to be configured in the OAuth credential settings.
Redirect URLs
A redirect URL is a required parameter of user authentication flows. This is the URL that your application will direct users to after they successfully authenticate.
Redirect URLs are managed as a property of OAuth credentials. They can be added to your credentials during the creation process, or any time through the Settings panel of the credentials item page. To add a redirect URL to your developer credentials, complete the following steps:
-
Sign in to your portal and search for your developer credentials.
-
Go to the item page of the credentials and click Settings > Application.
-
Under Redirect URLs, add the URL that you want to direct users to after completing authentication. This URL varies based on your application and typically takes the format of
"https:
or//<server> [:port]/callback.html" "http:
. This is a valid web page or server endpoint to which a user can be redirected after successful sign in.//my-arcgis-app: /auth" - For example, if you are running an application on
https:
, add//localhost: 8080 https:
to the list of redirect URLs. The exact URL depends on the name of your callback page and the programming language you are using. If you are following a "Sign in with user authentication" ArcGIS tutorial, it will specify the name of your callback page.//localhost: 8080/callback.html
- For example, if you are running an application on
Privileges and item access
With user authentication, access tokens inherit all privileges and item access rights from the signed-in ArcGIS user. OAuth credentials are not used to assign privileges or item access in this type of authentication.
Referrers
![Referrers DEV](/documentation/static/e6bf09391569485562f2ead793f4ffb9/4cdf7/referrer-urls.png)
A referrer is an HTTP header field used to identify the client requesting a server resource. This functions as a security measure, allowing applications to confirm their client's identity. When developer credentials have a specific HTTP referer
header set, services can confirm that an incoming request's referrer matches one of the valid referrers assigned to that access token.
Specific domains can be provided or you can use wildcard characters (*
) in the subdomain of your allowed referrer. For example https:
will allow the access token to be used on both https:
and https:
. While it is also possible to restrict access token use to specific paths (https:
), we do not recommend this method because browsers may remove the path due to privacy concerns.
Usage tracking
All services and content accessed with developer credentials are tracked. You can monitor the usage of credentials in order to view the consumption of services and the billing amount.
The steps to monitor usage vary based on the type of ArcGIS account the credentials were created with:
ArcGIS Location Platform developers use their dashboard to monitor service usage. To monitor service usage of developer credentials, use the following steps:
-
Go to location.arcgis.com and sign in with an ArcGIS Location Platform account.
-
Click My dashboard > Usage > Developer credentials.
-
In the left sidebar, select the developer credentials item you would like to review usage for.
-
In the Billing cycle selector, choose a billing cycle to inspect. The main panel of the window will show a usage report.
-
Review the usage report for the developer credentials. Usage information is organized by secure resource. Click Download CSV to download the information as a
.csv
file. -
Click the dropdown button on a specific service to view a usage timeline. The panel will show the resource consumption for each day of the billing cycle.
ArcGIS Online devleopers use their portal to monitor service usage. To monitor service usage of developer credentials, use the following steps:
-
Go to ArcGIS.com and sign in to your portal with an ArcGIS Online account.
-
Click Content > My content.
-
Find the developer credentials item you would like to review usage for. Go to its item page.
-
Click Settings > Application > View usage.
-
Review the usage report for the developer credentials. The Credits view displays the number of credits the application has consumed. The Users view displays the number of users who have signed in to your application, if applicable.
ArcGIS Enterprise devleopers use their portal to monitor service usage. To monitor service usage of developer credentials, use the following steps:
-
Go to the URL of your ArcGIS Enterprise portal and sign in with an ArcGIS Enterprise account.
-
Click Content > My content.
-
Find the developer credentials item you would like to review usage for. Go to its item page.
-
Click Settings > Application > View usage.
-
Review the usage report for the developer credentials. The Credits view displays the number of credits the application has consumed. The Users view displays the number of users who have signed in to your application, if applicable.