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: sources/platform/collaboration/general-resource-access.md
+67-1Lines changed: 67 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,9 @@ The default setting strikes a good balance for casual or internal use, but **Res
47
47
You can switch to **Restricted** access at any time. If it causes issues in your workflow, you can revert to the default setting just as easily.
48
48
49
49
:::note Support in public Actors
50
+
50
51
Because this is a new setting, some existing public Actors and integrations might not support it yet. Their authors need to update them to provide a valid token on all API calls.
52
+
51
53
:::
52
54
53
55
@@ -260,11 +262,75 @@ To test your public Actor, run it using an account with **General resource acces
260
262
261
263
:::
262
264
263
-
In practice, this means that all API calls originating from the Actor need to have a valid API token. If you are using Apify SDK, this should be the default behavior.
265
+
In practice, this means that:
266
+
- All API requests made by your Actor must include a valid API token.
267
+
- When using the Apify SDK or Apify Client, this is handled automatically.
268
+
- Avoid relying on URLs that require unrestricted access or authentication by default.
264
269
265
270
266
271
:::caution Actor Runs Inherit User Permissions
267
272
268
273
Keep in mind that when users run your public Actor, the Actor makes API calls under the user account, not your developer account. This means that it follows the **General resource access** configuration of the user account. The configuration of your developer account has no effect on the Actor users.
269
274
270
275
:::
276
+
277
+
### How to migrate Actors to support **Restricted** general resource access
278
+
This section provides a practical guide and best practices to help you update your public Actors so they fully support **Restricted general resource access**.
279
+
280
+
---
281
+
282
+
#### 1. Always authenticate API requests
283
+
284
+
All API requests from your Actor should use authenticated methods.
285
+
When using the [Apify SDK](https://docs.apify.com/sdk/js/) or [Apify Client](https://docs.apify.com/api/client/js/), this is done automatically.
286
+
287
+
If your Actor makes direct API calls, include the API token manually:
#### 2. Generate pre-signed URLs for external sharing
295
+
If your Actor outputs or shares links to storages (such as datasets or key-value store records), make sure to generate pre-signed URLs instead of hardcoding API URLs.
296
+
297
+
Pre-signed URLs allow secure, tokenless access for external users.
// Save pre-signed URL — accessible without authentication
312
+
awaitActor.pushData({ recordUrl });
313
+
```
314
+
315
+
For details on how to generate pre-signed URLs, see the section
316
+
👉 [Sharing restricted resources with pre-signed URLs](/platform/collaboration/general-resource-access#pre-signed-urls).
317
+
318
+
:::note Using Console URLs
319
+
320
+
Datasets and key-value stores also include a `consoleUrl` property.
321
+
Console URLs provide stable links to the resource’s page in Apify Console.
322
+
Unauthenticated users will be prompted to sign in, ensuring they have required permissions.
323
+
324
+
:::
325
+
326
+
#### Test your Actor under restricted access
327
+
Before publishing or updating your Actor, it’s important to verify that it works correctly for users with **restricted general resource access**.
328
+
329
+
You can easily test this by switching your own account’s setting to **Restricted**, or by creating an organization under your account and enabling restricted access there. This approach ensures your tests accurately reflect how your public Actor will behave for end users.
330
+
331
+
:::tip Make sure links work as expected
332
+
333
+
Once you’ve enabled restricted access, run your Actor and confirm that all links generated in logs, datasets, key-value stores, and status messages remain accessible as expected. Make sure any shared URLs - especially those stored in results or notifications — work without requiring an API token.
0 commit comments