Navigate API

The Navigate API allows you to generate one-time URLs that launch an Egnyte Web UI session directly in a user's browser using a public API token. This enables seamless integration of Egnyte's file browsing interface into your application without requiring users to log in separately.

Important: Your OAuth token must include the Egnyte.launchwebsession scope to use this API.

Base URL

https://{domain}.egnyte.com/pubapi/v2/navigate

Authentication

All requests require an OAuth 2.0 Bearer token with the Egnyte.launchwebsession scope:

Authorization: Bearer {access_token}

See Authentication for details on obtaining a token.

Generate Navigate URL

Creates a one-time URL that opens the Egnyte Web UI at a specified path. The URL can display either the full Web UI or an embedded view without navigation chrome.

Request

POST /pubapi/v2/navigate

Request Body

FieldTypeRequiredDescription
embeddedbooleanYesWhen true, returns a URL for an embedded view without header, search, folder tree, or activity stream. When false, returns the full Egnyte Web UI.
pathstringNoThe folder path to open. Defaults to the user's home folder if omitted. Example: /Shared/Projects/Project Alpha
sharebooleanNoWhen true, opens the share dialog at the specified path. Use with type, base, and items.
fileVersionbooleanNoWhen true, opens the file version view in embedded mode.
fileVersionFullUIbooleanNoWhen true, opens the file version view in full UI mode.
typestringNoType of items for share dialog. Values: File, Folder. Used with share: true.
basestringNoBase folder name for share dialog. Used with share: true.
itemsarray of stringsNoList of item paths to share. Used with share: true.
postMessageNotificationsbooleanNoWhen true, enables post-message notifications from the embedded UI to the parent window.
componentIdstringNoIdentifies the specific UI component to open. Used for targeted embedded UI integrations.

Example Request

curl -i -X POST "https://{domain}.egnyte.com/pubapi/v2/navigate" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -d '{
  "embedded": true,
  "path": "/Shared/Projects/Project Alpha"
}'

Response

200 OK

FieldTypeDescription
redirectstringOne-time URL that launches the Egnyte Web UI session. This URL can only be accessed once and expires after 1 minute. Subsequent attempts or expired URLs return a 404 error.

Example Response

{
  "redirect": "https://apidemo.egnyte.com/navigate/temp/2c7e1b8b-d6bf-46f3-b8f1-96a937555099"
}

Using the Navigate URL

Load the redirect URL in the user's browser to initialize an Egnyte Web UI session without requiring login. The URL is valid for a single use only and expires after 1 minute.

Warning: The redirect URL is a one-time token and expires in 1 minute. Accessing it a second time or after expiry will return a 404 error. Generate a new URL for each session.

Error Codes

StatusErrorDescriptionResolution
400Bad RequestSpecified path does not exist, or required fields are missing/invalidCheck the folder path exists in the domain and all required fields are provided
401UnauthorizedToken missing or does not include Egnyte.launchwebsession scopeObtain a new token with the required scope
403ForbiddenUser lacks permission to access the specified pathVerify the user has access to the folder or use a different path

Code Examples

POST /pubapi/v2/navigate

curl -i -X POST "https://{domain}.egnyte.com/pubapi/v2/navigate" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -d '{
  "embedded": true,
  "path": "/Shared/Projects/Project Alpha"
}'

POST /pubapi/v2/navigate

curl -i -X POST "https://{domain}.egnyte.com/pubapi/v2/navigate" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -d '{
  "embedded": true,
  "path": "/Shared/Projects/Project Alpha"
}'

Impersonation

The Navigate API supports impersonation, allowing administrators to generate Web UI sessions on behalf of other users. For details on implementing impersonation, see Best Practices: Impersonation.


Version 1 (Deprecated)

Deprecated: Version 1 of the Navigate API is deprecated. Use Version 2 documented above for new integrations.

The v1 endpoint generates a redirect response instead of returning a JSON object with a URL.

Request

POST /pubapi/v1/navigate/embedded/{scope}

Path Parameters

ParameterTypeRequiredDescription
scopestringYesScope of resources to access. Use home for the user's home folder, or folder/{path} for a specific folder path.

Example Request

curl -i -X POST "https://{domain}.egnyte.com/pubapi/v1/navigate/embedded/folder/Shared/test" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

303 See Other

The response is an HTTP 303 redirect with the one-time URL in the Location header.

Example Response

HTTP/1.1 303 See Other
Location: https://apidemo.egnyte.com/navigate/temp/15f221dc-5405-4988-9f47-f480dbb0b285
Content-Type: application/vnd.egnyte.error+json;v=1;charset=UTF-8

Note: Configure your HTTP client to not follow redirects automatically. Extract the URL from the Location header and load it in the user's browser. This API cannot be called directly from browser JavaScript because browsers automatically follow redirects.

Errors

StatusErrorDescriptionResolution
401UnauthorizedToken missing or does not include Egnyte.launchwebsession scopeObtain a new token with the required scope