Everything I have read looks to relate to AGOL apps and not a custom deployed 4.12 app.
Well, maybe it's fine. Is the new item in your AGO private or public? If it's public, I would be concerned that anyone could stumble across a link to that AGO item that consumes content that (presumably) requires credits.
Noah
I got it working by using the URL from the subscriber content and adding a new item from web in my own AGO content. When I pasted the URL it prompted me for credentials and I chose to store them in the service. I then shared that new item in my AGO. Is this not a secure or recommended workflow?
This workflow is specific to a custom JS API application. Requires making a registered app on AGO or via the Developer's site, and adding the relevant code to your app.
Working with the ArcGIS Platform | ArcGIS API for JavaScript 4.12
This sample uses a service proxy to access a premium service from AGO.
Directions widget | ArcGIS API for JavaScript 4.12
Sample using OAuth as recommended in the previous guide topics.
Access ArcGIS Online items using OAuthentication | ArcGIS API for JavaScript 4.12
You can also use a proxy to access secure services, from AGO and other Servers.
Proxy pages with the API | ArcGIS API for JavaScript 4.12
Thanks Noah. I have been looking at those and, I'm sure I am overlooking something, everything I have read is describing the process to use it with a AGOL App. I need a custom app built in 4.12 to use subscriber content.
Hi Jay, you might want to review our docs about working with the ArcGIS Platform, and about accessing secure resources:
Access secure resources | ArcGIS API for JavaScript 4.12
I assume a request interceptor is needed to add it the imageryserver url. Where do I generate the token then?
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.