Adding a URL reference to an existing app is an effective way to share your work with members of your organization and the public (depending on your sharing privileges). In addition to the URL, you can share other details such as the type of app, its purpose, a summary and description, and a .zip file with the code you used to create the app. Adding an app to ArcGIS Online only adds a reference to the app URL; ArcGIS Online does not store the app files.
As an app developer with an organizational account, you can also register apps with the platform. This involves registering an OAuth application so that organization members and users outside the organization can sign in to the app. See the Add and register an app using developer credentials section below for more information.
If you do not need to register your app—for example, when uploading a code sample—follow the steps in the Add an app from a URL section below.
Tip:
Another way to share apps with members of your organization and the public is to create apps with maps and gallery apps with groups.
Add an app from a URL
Follow these steps to add an item that uses a URL to access an app on the web but does not need to be registered (for example, code samples):
Note:
To add a registered app, follow the steps to add and register an app using developer credentials.
- Verify that you are signed in and have the privilege to create, update, and delete content.
- From the My content tab of the content page, click New item and click Application.
- Choose the type of app:
- Web mapping—A web app built with a web API, such as JavaScript.
- Desktop—An app for desktops built on a desktop platform, such as Java or .NET (Microsoft Windows Desktop).
- Mobile—A downloadable app built for mobile devices with an SDK, such as iOS or Android.
- Other application—A desktop application, Python script, or any type of generic app for which you don't have details about the application's purpose, API, SDK, or URL address.
- For web mapping, desktop, or mobile, type the URL of the app, for example, https://<myServer>/myWebMapApp.
- For desktop apps, click Browse and choose the .zip file that contains the app.
- Click Next.
- Provide a title.
- Choose a folder in My content where you want to save the item.
Alternatively, you can choose Create new folder from the menu and type a folder name to save the item in a new folder.
Folder names cannot contain 4-byte Unicode characters.
- If your organization has set up content categories, click Assign categories and select up to 20 categories to help users find the item.
You can also start typing a category name to narrow the list of categories.
- Optionally, type tags that describe the item.
Separate the terms with commas (for example, Federal land is considered one tag, and Federal, land is considered two tags).
As you type, you can choose any of the suggested tags that appear; suggestions are generated from tags you previously added.
- Optionally, add a summary that describes the app.
- Click Save.
Once you add the app, it appears in your content. If you need to register it later, you can do so from the Settings tab of the app's item page. See the Add and register an app using developer credentials section below for more information.
You can configure the item details, attach code if required, and share the app if you have sharing privileges.
Create developer credential items
As a developer with an organizational account, create a developer credentials item to generate an app ID. Use the app ID in the app to collect usage statistics and to allow users to sign in to the platform with OAuth 2.0, a standardized authorization framework. With OAuth 2.0, apps guide the user to sign in to the platform through a platform-hosted login page. It also allows the app to work with user content associated with their organization as well as work with other ArcGIS Online capabilities such as geocoding, routing, and GeoEnrichment. To learn more about authentication and OAuth 2.0, see Esri Developer.
You can also create developer credentials for app authentication and for generating API keys.
What type of developer credentials you create depends on your privileges in the organization. If you are a member of the default administrator role or a member of a custom role with the privilege to generate API keys, you can use either an OAuth 2.0 or an API key credential. Otherwise, you can use only OAuth 2.0 developer credentials.
Once you create developer credentials, click View usage on the Settings tab of the app's item page to access information about who has signed in to the app and the number of credits they've consumed. You can also manage settings for the credentials embedded in the app.
Note:
The View usage section is not available when signed in through an ArcGIS Location Platform subscription.
The implementation pattern for user logins differs slightly depending on whether you are developing a web-based app or a native app. Esri Developer documentation includes details and code samples for both web-based apps and native apps.
Create OAuth 2.0 credentials for user authentication
Complete the following steps if your app requires users to sign in with an ArcGIS Online account.
- Verify that you are signed in with an organizational account that has the privilege to create, update, and delete content.
- Click the My content tab of the content page and click New item.
- In the New item window, click Developer credentials.
The first window presented to you will differ depending on your privileges in the organization. If you are a member of a role that does not include the privilege to create API keys, proceed to step 5. If your role includes privileges to create API keys, proceed to step 4.
- Choose the OAuth 2.0 credentials—For user authentication option and click Next.
- Under Redirect URLs, provide the URL to a web page or server endpoint that will be used to redirect users after they successfully sign in. Click Add to add more redirect URLs as needed.
The redirect URLs specified during authorization must match one of the registered URLs; otherwise, authorization will be rejected.
A special value of urn:ietf:wg:oauth:2.0:oob can also be specified for authorization grants. This results in the authorization code being delivered to a portal URL (/oauth2/approval). This value is typically used by apps that don't have a web server or a custom URL scheme where the code can be delivered.
The following are examples of supported redirect URL formats:
- https://app.foo.com
- urn:ietf:wg:oauth:2.0:oob
- In the URL box, type a URL for your app in the format https://<myServer>/myWebMapApp.
- Click Next.
- Provide a title.
- Choose a folder in My content where you want to save the item.
Alternatively, you can choose Create new folder from the menu and type a folder name to save the item in a new folder.
Folder names cannot contain 4-byte Unicode characters.
- If your organization has set up content categories, click Assign categories and select up to 20 categories to help users find the item.
You can also start typing a category name to narrow the list of categories.
- Optionally, type tags that describe the item.
Separate the terms with commas (for example, Federal land is considered one tag, and Federal, land is considered two tags).
As you type, you can choose any of the suggested tags that appear; suggestions are generated from tags you previously added.
- Optionally, add a summary that describes the app.
- Click Next.
The credential summary is displayed.
- Review the credential summary. To change settings, click Back to make changes before you create the item.
- Click Create.
The app is added to your content and its item page appears. A badge
indicating that OAuth 2.0 credentials are used with the app appears on the item page and when the item is viewed from the content page or item preview panes. On the Overview tab of the item page, the badge indicates whether personal privileges are included or if only standard privileges are included in the credentials.
Create OAuth 2.0 credentials for app authentication
Complete the following steps if your public app does not require users to sign in and generate access tokens server-side.
- Verify that you are signed in with an organizational account that has the privilege to create, update, and delete content.
- Click the My content tab of the content page and click New item.
- In the New item window, click Developer credentials.
The first window presented to you will differ depending on your privileges in the organization. If you are a member of a role that does not include the privilege to create API keys, proceed to step 5. If your role includes privileges to create API keys, proceed to step 4.
- Choose the OAuth 2.0 credentials—For app authentication option and click Next.
- Under Where will you use these credentials, choose one of the following options:
- Private application with the selected privileges and access—Choose this option to grant access to any set of your items and privileges. You can embed this in a private app or in a server-side component used by a public app.
- Private application that impersonates you—Choose this option to grant all of your current privileges along with your access to organization content, members, and settings.
- Click Next.
- Optionally, if you selected Private application with the selected privileges and access, choose one of the following options:
- No item access—No item access is required for this credential. Click Next.
- Grant item access using privileges—Select privileges are required to allow access to items for this credential. Click Next.
- Grant access to specific items—You must first select items you own that to grant access. Click Next.
- Optionally, if you selected Private application with the selected privileges and access, choose what actions the credentials will allow the app to perform by assigning privileges. Click Next.
The list of privileges available to you varies depending on whether you have an ArcGIS Location Platform subscription and what privileges you have in the organization. You cannot grant privileges that your account does not possess.
For information about types of privileges, refer to the Security and authentication guide in the Esri developer help.
- Click Next.
- Under Referrer URLs, provide the URL or IP address that is allowed to connect to the app. Click Add to add more referrer URLs or IP addresses needed.
The URLs specified during authorization must match one of the registered URLs; otherwise, authorization is rejected.
The following are examples of supported referrer URL formats:
- https://www.example.com/pages
- https://www.example.com/pages/index.html
- Click Next.
- Provide a title.
- Choose a folder in My content where you want to save the item.
Alternatively, you can choose Create new folder from the menu and type a folder name to save the item in a new folder.
Folder names cannot contain 4-byte Unicode characters.
- If your organization has set up content categories, click Assign categories and select up to 20 categories to help users find the item.
You can also start typing a category name to narrow the list of categories.
- Optionally, type tags that describe the item.
Separate the terms with commas (for example, Federal land is considered one tag, and Federal, land is considered two tags).
As you type, you can choose any of the suggested tags that appear; suggestions are generated from tags you previously added.
- Optionally, add a summary that describes the app.
- Click Next.
The credential summary is displayed.
- Review the credential summary. To change settings, click Back to make changes before you create the item.
- If you selected Private application that impersonates you, click the box next to I acknowledge and accept the security requirements associated with the selected privileges.
- Click Create.
The app is added to your content and its item page appears. A badge
indicating OAuth 2.0 credentials appear when the item is viewed from the content page or item preview panes. On the Overview tab of the item page, the badge OAuth 2.0 Credentials - Impersonates Item owner appears if you chose Private application that impersonates you under Where will you use these credentials.
Create API key credentials
Complete the following steps to create API key credentials.
- Verify that you are signed in with an organizational account and has the privileges to create API keys and create, update, and delete content.
- Click the My content tab of the content page and click New item.
- In the New item window, click Developer credentials.
- Choose the API key credentials option and click Next.
- Under Where will you use these credentials, choose one of the following options:
- Public application—Choose this option to grant access to specific items and service privileges.
- Private application with the selected privileges and access—Choose this option to grant access to any set of your items and privileges. You can embed this in a private app or in a server-side component used by a public app.
- Private application that impersonates you—Choose this option to grant all of your current privileges along with your access to organization content, members, and settings.
- Click Next.
- Optionally, if you selected Public application, choose one of the following options:
- No item access—No item access is required for this credential. Click Next.
- Grant access to specific items—You must first select items you own, then click Next.
- Optionally, if you selected Private application with the selected privileges and access, choose one of the following options:
- No item access—No item access is required for this credential. Click Next.
- Grant item access using privileges—Select privileges are required to allow access to items for this credential. Click Next.
- Grant access to specific items—You must first select items you own, then click Next.
- Optionally, if you selected Public application or Private application with the selected privileges and access, choose what actions the credentials will allow the app to perform by assigning privileges. Click Next.
The list of privileges available to you will vary depending on whether you have an ArcGIS Location Platform subscription and what privileges you have in the organization. You cannot grant privileges that your account does not possess.
For information about types of privileges, refer to the Security and authentication guide in the Esri developer help.
- Optionally, if you selected Private application that impersonates you, use the calendar to specify an expiration date for the credentials.
Credentials can expire the next day (minimum) or 365 days hence (maximum). They expire at 23:59 on the date that you choose for expiration. The time is stored based on your browser time when you add the app and generate the credentials.
- Under Referrer URLs, provide the URL or IP address that is allowed to connect to the app. Click Add to add more referrer URLs or IP addresses if needed.
The URLs specified during authorization must match one of the registered URLs; otherwise, authorization is rejected.
The following are examples of supported referrer URL formats:
- https://www.example.com/pages
- https://www.example.com/pages/index.html
- Click Next.
- Provide a title.
- Choose a folder in My content where you want to save the item.
Alternatively, you can choose Create new folder from the menu and type a folder name to save the item in a new folder.
Folder names cannot contain 4-byte Unicode characters.
- If your organization has set up content categories, click Assign categories and select up to 20 categories to help users find the item.
You can also start typing a category name to narrow the list of categories.
- Optionally, type tags that describe the item.
Separate the terms with commas (for example, Federal land is considered one tag, and Federal, land is considered two tags).
As you type, you can choose any of the suggested tags that appear; suggestions are generated from tags you previously added.
- Optionally, add a summary that describes the app.
- Click Next.
The credential summary is displayed.
- Review the credential summary. To change settings, click Back to make changes before you create the item.
- If you selected Private application that impersonates you, click the box next to I acknowledge and accept the security requirements associated with the selected privileges.
- Click Create.
The app is added to your content and its item page appears. A badge
indicating that an API key is embedded with the app appears on the item page and when the item is viewed from the content page or item preview panes. On the Overview tab of the item page, the badge indicates whether personal privileges are included or if only standard privileges are included in the credentials.