You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: snippets/general-shared-text/dropbox-cli-api.mdx
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,3 +12,9 @@ The following environment variables:
12
12
13
13
-`DROPBOX_REMOTE_URL` - The remote URL to the target subfolder inside of the app folder for the Dropbox app, represented by `--remote-url` (CLI) or `remote_url` (Python).
14
14
-`DROPBOX_ACCESS_TOKEN` - The value of the access token for the Dropbox app that is associated with the target app folder, represented by `--token` (CLI) or `token` (Python).
15
+
16
+
To have Unstructured refresh expired Dropbox App access tokens on your behalf, you must also provide the following environment variables:
17
+
18
+
-`DROPBOX_REFRESH_TOKEN` - The value of the refresh token for the corresponding access token, represented by `--refresh-token` (CLI) or `refresh_token` (Python).
19
+
-`DROPBOX_APP_KEY` - The app key for the Dropbox app, represented by `--app-key` (CLI) or `app_key` (Python).
20
+
-`DROPBOX_APP_SECRET` - The app secret for the Dropbox app, represented by `--app-secret` (CLI) or `app_secret` (Python).
Copy file name to clipboardExpand all lines: snippets/general-shared-text/dropbox.mdx
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,17 @@ allowfullscreen
29
29
Access tokens are valid for **only four hours** after they are created. After this four-hour period, you can no longer use the expired access token.
30
30
Dropbox does not allow the creation of access tokens that are valid for more than four hours.
31
31
32
-
To generate a replacement token for an expired one, see [Replace an expired access token](#replace-an-expired-access-token), later in this article.
32
+
To replace an expired access token, you must first generate a _refresh token_ for the corresponding access token. To learn how to generate an access token and its corresponding refresh token,
33
+
see [Replace an expired access token](#replace-an-expired-access-token), later in this article.
34
+
35
+
If you do not already have the corresponding refresh token for an existing access token, or if you lose a refresh token after you generate it,
36
+
you must generate a new access token and its corresponding refresh token.
37
+
38
+
For [Unstructured Ingest](/ingestion/overview), instead of continualy replacing expired access tokens yourself, you can have Unstructured do it for you as needed; just supply Unstructured
39
+
with the original access token and its corresponding refresh token along with the Dropbox app's **App key** and **App secret** values.
40
+
To learn how to supply these to Unstructured, look for mentions of "access token, "refresh token," "app key," and "app secret" in the connector settings later in this article.
41
+
42
+
For the [Unstructured Platform](/platform/overview), or if you want to otherwise use the refresh token to replace the expired access token yourself, currently you must manually replace expired access tokens.
33
43
</Warning>
34
44
35
45
3. The app folder that your Dropbox app will use for access can be found in your Dropbox account under the `Apps` top-level folder. For example, if the value of the **App folder name**
@@ -96,7 +106,11 @@ To replace an old, expired access token with a new, valid one, do the following:
96
106
- The value of `refresh_token` is the refresh token that you can use to replace this access token much faster and easier next time.
97
107
If you lose this refresh token, you must go back to Step 2.
98
108
99
-
8. To use the refresh token to replace the expired access token, make the following REST API call, replacing the following placeholders:
109
+
For [Unstructured Ingest](/ingestion/overview), if you want Unstructured to use this refresh token to automatically replace the expired access token instead of replacing it yourself, then
110
+
simply supply Unstructured with these `access_token` and `refresh_token` values, along with the `<app-key>` and `<app-secret>` values
111
+
as described earlier in this procedure, and then stop here.
112
+
113
+
8. For the [Unstructured Platform](/platform/overview), or if you want to otherwise use the refresh token to replace the expired access token yourself, make the following REST API call, replacing the following placeholders:
100
114
101
115
- Replace `<refresh-token>` with the refresh token.
102
116
- Replace `<app-key>` with the app key for your Dropbox app.
@@ -114,6 +128,6 @@ To replace an old, expired access token with a new, valid one, do the following:
114
128
115
129
- The value of `access_token` (starting with the characters `sl`) is the new, valid access token. In the connector, replace the old,
116
130
expired access token value with this new, valid access token value.
117
-
- The value of `refresh_token` is the new, valid refresh token. To replace the expired access token, go back to Step 8.
131
+
- The value of `refresh_token` is the new, valid refresh token. To replace the expired access token yourself, go back to Step 8.
0 commit comments