Self Hosted YOURLS

Created on 22 May 2025, 21 days ago

I have a self Hosted YOURLS and i need to integrate it with Drupal 10

Can you tell me where to configure that in Drupal 10 ?

In Shorten API Keys page i can find only the following services :
Bit.ly , j.mp, BudURL, Cligs, Ez, Fwd4.me, Goo.gl, and Redir.ec

I cannot see YOURLS !!!

I only see Custom services, but not sure what to put in these values:

API endpoint URL:
Response type : Text or XML or JSON
XML tag or JSON key:

💬 Support request
Status

Active

Version

2.0

Component

Documentation

Created by

🇵🇸Palestine myfriend2me

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @myfriend2me
  • 🇩🇪Germany joachim namyslo Kulmbach 🇩🇪 🇪🇺

    Of course, we can.

    1. Install Yourls and make it accessible under a subdomain of your server.
    2. Don't forget to configure Yourls so that you can log in, and the value YOURLS_COOKIEKEY is generated in your config.php. You can find out how to do this in the excellent Yourls documentation: https://yourls.org/docs

    Once you have installed Yourls and can log in to the UI via shorten.yourdomain.com/admin with the username and password you specified, you will need your API key.

    If we stick with the example above, you can find your API key at shorten.yourdomain.com/admin/tools php in the section
    Secure passwordless API call
    under the heading
    Usage of the signature token
    There, in the API request example, you will find the token that was randomly generated for your Yourls installation.

    An example:
    https://shorten.yourdomain.com/yourls-api.php?signature=5344672a5f&action=...
    Accordingly, the token you need is: 5344672a5f
    After you have installed Shorten and activated the Shorten URLS custom services module next to the Shorten module, you are ready to save your Yourls installation as a custom service in the module configuration.

    To do this, go to the page https://yourdomain.com/admin/config/services/shorten/custom.

    In the Title field, enter Yourls, and in the API endpoint URL field, enter:
    https://shorten.yourdomain.com/yourls-api.php?action=shorturl&format=sim...
    Leave the response type set to Text.

    Then click Save configuration.

    Congratulations: You have just added a new service provider to the Service and Backup Service drop-down menus. If you entered Yourls in the Title field, you will now find the provider with the value Yourls in the two drop-down menus on the page https://yourdomain.com/admin/config/services/shorten
    Note: Yourls can only be specified once, either as a service or as a backup service. Anything else makes no sense.

    Select Yourls as the service and check that you have selected Curl in the Method section.

    To test whether it works, you can add the shorten urls block under /admin/structure/block to the sidebar, for example, and save your new block layout. You can then switch to your website's home page and enter the address from your browser's address bar into the block.

    You can also use https://drupal.org to test it.

    Once you have entered the domain in the input field of the block, simply click on Shorten URL.
    If everything has worked as desired, you will now find the shortened URL in the admin area of Yourls.
    Please note: The module transfers the entered addresses to Yourls, and you can also view them in the admin area.

    What it does not do is return the shortened version to Drupal so that a user can see the URL created in this way. This is unfortunate and makes using Yourls together with Shorten relatively pointless for most users. But it does what it is intended to do.
    Have fun recreating it.

  • 🇵🇸Palestine myfriend2me

    Thank you for this valuable reply

Production build 0.71.5 2024