Skip to content

Privatebin/YOURLS integration: API call to YOURLS not completing as intended #725

@DalekDave

Description

@DalekDave

This is probably not a bug I'm reporting. It's more likely a misconfiguration in my Privatebit or my YOURLS - I'm not sure which one. I have also posted about this in the YOURLS user forum at https://discourse.yourls.org/t/how-do-i-call-the-yourls-api-from-a-privatebin-instance/377

I'm using an API call to YOURLS to enable URL shortening in my Privatebin instance.
In my Privatebin’s conf.php, I have the API call to YOURLS defined as:

urlshortener = “https://t25b.xyz/yourls-api.php?signature=xxxxxxxxxx&action=shorturl&format=json&url=”

Screenshot_20201129_183132

I have Privatebin at https://t25b.com and YOURLS at https://t25b.xyz. They are both hosted on the same server and the same IP address.

When Privatebin makes the API call to YOURLS, YOURL is indeed correctly registering a short URL from the Pastebin long URL, but instead of the short URL being placed in the Pastebin page in replacement of the long URL, it is being displayed in a new tab of my browser. Plus, the ‘Shorten URL’ button on the Pastebin instance is remaining enabled and I can generate another short URL (which is also displayed in a new tab).

Screenshot_20201129_190438

That is not the intended outcome, but I haven’t managed to figure out what the problem is, and whether it’s in my Pastebin configuration or my YOURLS configuration, or whether it's a bug.

The behavior can be seen now on the sites above.

If it's my configuration error, would you have any tips or solutions?
Thanks in advance if so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions