How do I call the YOURLS API from a Privatebin instance?

Sorry, I’ve searched the YOURLS wiki, the files in the YOURLS package and the Web, but I didn’t find an answer…

I’m trying to use YOURLS alongside Privatebin. Specifically, I want to be able to shorten Privatebin URLs by hitting the ‘Shorten’ button in the Privatebin interface, in which it makes an API call to the URL shortener. in the form:

https://example.com?user=john&password=oteuhtoheutoh/url=https://anotherexample.com/somedir/somefile.html

Or something like that. In the file ‘sample-remote-api-call.txt’ , it covers calling the API programatically but does not give an example of the actual formed URL to send.

In Privatebin’s configuration for calling the shortener API, I get to specify a one-line URL of the above type.

Can you tell me what the URL would be? I would preferably like the API to be only available using a username and password. If possible, can you give examples with keyword(s) and a titile?

Many thanks in advance for any help.

Calling the API via GET is like any other URL of any service : apiurl.com/apipath?param1=value1&param2=value2&...

Example:
http://sho.rt/yourls-api.php?username=joe&password=12345&action=shorturl&url=http://longurl.com

Parameters are described at http://yourls.org/#API

Privatebin makes the API call to YOURLS, YOURL is indeed correctly registering a short URL from the Pastebin long URL

You’re describing Pastebin issues, not YOURLS issues. I don’t know Pastebin.

Thank you for the answers. :smile: