Using the api commands in Yourls/Docker

I have yourls running under docker successfully using this configuration:

image: yourls:1.7.4
  - 80:80
  YOURLS_SITE: http://localhost:80
  YOURLS_USER: example_username
  YOURLS_PASS: example_password  
  - mysql

And I’m able to add links through the dashboard, however, when I attempt to lookup a short URL through the API, I get this error:

yourls_1 | - - [03/Oct/2020:07:27:30 +0000] “GET /?url=http%3A%2F%2Flocalhost%3A5000%2Forg%2Fasdf&action=shorturl&keyword=asdf&signature=a0bd396d5d&format=json HTTP/1.1” 403 451 “-” “-”

yourls_1 | [Sat Oct 03 07:27:30.116279 2020] [autoindex:error] [pid 25] [client] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive

Any guidance would be great!

I think it should GET /yourls-api.php?blabla, not /?blabla

1 Like

:face_with_hand_over_mouth: you’re right. thanks so much.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.