Web app builder shows premium content access option in "Attribute" tab, with custom URLs that are used in widgets. I want to use create watershed analysis service and let public use certain limit of credits that I have available to my organizational account.
I have tried different settings here, but nothing seems to be working. I public view of this web app, when ever user clicks on widget for running analysis, ArcGIS Online takes the user to sign in page for my organization.
Has anyone else solved this issue?
I have not experience using premium content but it just sounds like you have to setup a proxy for your app to use to access your premium content (just like you would for secured service access).
Thanks for you reply. I think you do not need to create proxy for web app builder if you are using it through ArcGISOnline with the hosted services.
Actually when I add the above mentioned custom URL (GP Service for creating watershed )
(http://analysis7.arcgis.com/arcgis/rest/services/tasks/GPServer/CreateWatersheds/submitJob) (Got link of this url through fiddler), I get this error message, which clearly explains that If failed to create proxy , which means that AGOL is trying to create proxy.
However if I use this url for Custom urls:
AGOL has no issues in creating proxy, but it does not works as expected i.e. do not give
credentials page for public user, and use Organizational credits.
Sorry for that misunderstanding.
Since this is relatively new functionality so I wanted to try it first on AGOL, and then with web developer tools.
Sent from my iPhone
> I want to use create watershed analysis service and let public use certain limit of credits that I have available to my organizational account.
Yes, this is possible. You will need to add the Premium Service as a new item in your ArcGIS Online organization and save credentials with it. Then share it with everyone. Then copy the item's REST URL (this is located in the lower right corner of the Item Details page, Overview tab) and reference this URL in the Premium content access panel (in your original post screenshot) in Web AppBuilder, as well as the widget that will be using the Premium service.
Help topic: Configure Premium Service
Once this is enabled, when you share your app - your end users will not be prompted for a login when they attempt to execute the widget.
Hope this helps,
Thanks for you very informative reply. I have been trying to use it, however I am getting stuck at few issues.
First of all I created the wrapper service just like you said for this ESRI's premium service and set its sharing option to public:
The wrapper url comes out to be:
Now in Web app builder (AGSOL), I added a new geoprocessing widget:
And in the url I entered the wrapper url.
Then I selected the option of "interactively drawing on the map" for InputPoints. I left the rest of options as default.
Now When I run this widget I get the dialog and I click on the map and run the execute button.
I may get the result once, but later all I get is this error result, which I have not been able to figure out why it is happening.
I will really appreciate your help in this regard.
I have tried two other methods too, but they also resulted in same error message.
One method was to add url in "Attribute" tab of Web app builder, which actually creates the AGOL hosted proxy service. I tried to use that proxy url in the add widget button, but got the same error window as above.
Second method that I tried was quite similar, but this time instead of adding private content url in "Attribute" tab of Web appbuilder, I directly created the service proxy in ArcGIS for developers page. From the configure new service proxy I selected "hydrology" option and used this proxy url in web app, but unfortunately it also resulted in same error.
Apologies for the oversight, but I just realized that the Watershed Analysis service you want to add:
is actually already part of the Analysis widget in Web AppBuilder,
So you don't have to add/enable it in the Geoprocessing widget, simply select this functionality when you configure the Analysis widget.
Also, since the analysis services in the Analysis widget are creating new data content (behind the scenes when you run the tools), I don't believe you can enable this functionality for public (e.g., anonymous) access. ArcGIS Online requires a specific named account to run these tools so the new data created will be owned by the account that is running the tool. I am checking into this to confirm.
Hope this helps,
I've gotten confirmation that the analysis services (from ArcGIS Online) in the Analysis widget must be run with a logged in ArcGIS account and cannot be enabled for public access.
Hope this helps,