Select to view content in your preferred language

Open Experience builder with Token

375
2
06-10-2025 01:16 PM
kapalczynski
Frequent Contributor

I am trying to open my experience builder with a Token.

I have data residing in Portal that is referenced in AGOL and saved with a password.
I create the web map and the experience builder. 

I then try and use this URL format to open the Experience with the token which should provide the Authentication.  But it still asks for AGOL Auth.

Example: not a working URL

https://experience.arcgis.com/experience/32bed8f9546f4xxxxxxxxcff397c?token=mzFcMRqhxxxxxx2MJj3k2Hw6...

I then read this... That the Request required an Application and Secret to Auth

Can anyone speak on this and provide an example of the URL including the Org and App ID... 

I am assuming that I can use the token and NOT have this Feature Layers, Web Map and Experience builder App shared publicly as the TOKEN should provide all the Auth I need... 

Is this correct?

To open Experience Builder with a token, you'll need to use the token as a URL parameter in the Experience Builder application URL. You can then specify the URL to your ArcGIS Online or ArcGIS Enterprise organization and the app ID for the Client ID, and then sign in. 
 
Here's a more detailed breakdown:
  1. 1. Obtain an ArcGIS Token:
    .Opens in new tab
    You'll need to generate an ArcGIS token, which is a security token that grants access to secure resources in ArcGIS. You can generate a token using the ArcGIS Online API. 
     
  2. 2. Pass the Token as a URL Parameter:
    .Opens in new tab
    Add the token to the Experience Builder application URL as a query string parameter (e.g., http://localhost/your_wab_application?token=YOUR_TOKEN_HERE). This tells Experience Builder to use the provided token for authentication. 
     
  3. 3. Specify Organization and App ID:
    .Opens in new tab
    When opening Experience Builder, you'll also need to specify the URL to your ArcGIS Online or ArcGIS Enterprise organization and the App ID for the Client ID. 
     
  4. 4. Sign In:
    .Opens in new tab
    After providing the URL, organization details, and app ID, you can sign in to Experience Builder using the token that you've passed as a parameter. 



0 Kudos
2 Replies
TimWestern
MVP

The token, is a token usually generated by arcGIS for authenticating a user.

When it asks about an App ID, Secret, or Client ID, its is referencing  portal item it expected that created those.

I think its under New Application > Other Apps> And then you configure the redirect url (usually https://localhost:3001)

And it generates both of them for you. This is used the first time you open EXP when building locally with Experience Builder.

What bothers me, is I'm not sure why its a requirement for the AGOL/Portal/Experience to load, that one threw me.

I know WebAppBuilder did allow token authentication to a degree, I don't remember if EXB did this.

As suggested by this thread: https://community.esri.com/t5/arcgis-experience-builder-questions/url-parameter-token/td-p/1052306

I'll keep looking to see if anything this year has been done about this yet, but I don't recall seeing it.



0 Kudos
Wei_Ying
Esri Regular Contributor

Hi,

EXB does not support passing token like that way like WAB does, for security concern.
To pass auth through URL of EXB app, you may try this format: 
https://www.arcgis.com/sharing/rest/oauth2/authorize/sso?redirect_uri=https://experience.arcgis.com/... 

See more discussion here https://community.esri.com/t5/arcgis-experience-builder-questions/url-parameter-token/m-p/1410074/hi...