Subsonic Password

I found where the method of getting a password for subsonic is described, but my attempts to post to create the password are failing, how do I do that?

My best attempt is:

╰─>$ wget --post-data ‘{ “length”: 16, “description”: “phone” }’ https://domain/index.php/apps/music/api/settings/userkey/generate
–2021-02-08 11:23:39-- https://domain/index.php/apps/music/api/settings/userkey/generate
Resolving domain (domain)… XXX.XXX.XXX.XXX
Connecting to domain (domain)|XXX.XXX.XXX.XXX|:443… connected.
HTTP request sent, awaiting response… 500 Internal Server Error
2021-02-08 11:23:40 ERROR 500: Internal Server Error.

That probably doesn’t work for you from the command line because you would need to have an active user session in the context before calling this API. The created key will be bound to an user account, so the whole command makes no sense without the user.

If you are just trying to create an API key for your own use, then you should do it via the Music app Settings view. There’s button “Generate API password” under the section “Ampache and Subsonic”.

Using the API is plausible option only if you are creating your own Nextcloud application, and you wish to integrate it with the Music app. This is basically so special case, that I don’t quite understand, why it has been added to the readme file in the first place. But the whole file is kind of a mess, mixing wildly information relevant to end users and information relevant to developers, along with some pieces which probably interest no-one. It would be best to rewrite the whole thing, but documenting is not my favorite spare time activity :P.

1 Like

Thank you.

There may be a basic pull request that at least clears this up soon :slight_smile:

Or good dev is good, and has already done the sensible thing :slight_smile: