PHPackages                             intoeetive/protectedlinks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. intoeetive/protectedlinks

ActiveCraft-plugin[File &amp; Storage](/categories/file-storage)

intoeetive/protectedlinks
=========================

Secure &amp; restricted files download

0.0.4(4y ago)156.1k11[2 PRs](https://github.com/intoeetive/protectedlinks/pulls)MITPHPCI failing

Since May 3Pushed 3y ago2 watchersCompare

[ Source](https://github.com/intoeetive/protectedlinks)[ Packagist](https://packagist.org/packages/intoeetive/protectedlinks)[ RSS](/packages/intoeetive-protectedlinks/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

Protected Links plugin for Craft CMS 3.x
========================================

[](#protected-links-plugin-for-craft-cms-3x)

This plugin is intended to provide a way for restricting access to asset files and hide their actual location. Additionally, it will count downloads for each file.

[![Download stats](resources/img/scr1.png)](resources/img/scr1.png)

The access can be restricted to logged in users, or only certain user, or to member groups. The access can also be set to expire.

The plugin can also be used to hide actual file location.

[![Access restriction](resources/img/scr2.png)](resources/img/scr2.png)

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 3.0.0-beta.23 or later.

Usage
-----

[](#usage)

The main (and currently only) template variable is `craft.protectedLinks.link`

Hide the file location without any restrictions:

```
{{ craft.protectedLinks.link({assetId: entry.downloads.first.id}) }}

```

Limit access to logged in users and display file inline in browser:

```
{{ craft.protectedLinks.link({assetId: 105, inline: true, requireLogin: true)}

```

Restrict file access to users in groups 1 and 7; allow access only when link is clicked on your site

```
{{ craft.protectedLinks.link({assetId: 105, memberGroups: [1,7], denyHotlink: true}) }}

```

Limit access to currently logged in user and display file inline in browser; make the link expire on 30th of April:

```
{{ craft.protectedLinks.link({assetId: 105, inline: true, members: craft.app.user.id, dateExpires: date('2018-04-30')}) }}

```

Limit access to members with ID 1, 7 and 13; set the link to expire tomorrow:

```
{{ craft.protectedLinks.link({assetId: 105, members: [1,7,13], dateExpires: now|date_modify('+1 day')|date('Y-m-d')}) }}

```

Admin users can download files even if they are restricted to other user or group.

In addition to it's own checks, Protected Links also respects permissions set on Asset Volume in Craft.

### Parameters

[](#parameters)

ParameterExplanationassetIdAsset Id. RequireddenyHotlinkDisallow hotlinking (only allow access if followed from your site)requireLoginAllow access to any logged in membermemberGroupsUser groups allowed to access the file. Can be single ID or Twig array of IDsmembersUsers allowed to access the file. Can be single ID or Twig array of IDsinlineDisplay file inline in browsermimeTypeFile mime typedateExpiresLink expirationInstallation
------------

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require intoeetive/protectedlinks

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Protected Links.

Support
-------

[](#support)

If you encounter any issues with the plugin, please post to GitHub issues.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~290 days

Total

5

Last Release

1773d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3948bf2fda0c34b3b83e1367b634fc990c6a631e572554e9c62a8d8aa3843235?d=identicon)[intoeetive](/maintainers/intoeetive)

---

Top Contributors

[![rmdev](https://avatars.githubusercontent.com/u/741043?v=4)](https://github.com/rmdev "rmdev (1 commits)")

---

Tags

craft-cmsintoeetive-craft-plugindownloadsassetsCraftcraftcmscraft-pluginprotected linksrestricted content

### Embed Badge

![Health badge](/badges/intoeetive-protectedlinks/health.svg)

```
[![Health](https://phpackages.com/badges/intoeetive-protectedlinks/health.svg)](https://phpackages.com/packages/intoeetive-protectedlinks)
```

###  Alternatives

[superbig/craft3-beam

Generate CSVs and XLS files in your templates

1933.9k](/packages/superbig-craft3-beam)[servd/craft-remote-assets

Move CP assets to an external filesystem such as S3

1215.8k](/packages/servd-craft-remote-assets)[weareferal/remote-backup

Backup your database and assets to a remote location

115.5k](/packages/weareferal-remote-backup)[venveo/craft-compress

Create smart zip files from Craft assets on the fly

124.6k](/packages/venveo-craft-compress)[markdrzy/importable

Add CSV data import functionality to the native Table fieldtype.

114.6k2](/packages/markdrzy-importable)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
