Jump to content

Problem with Api


Alan1234
Go to solution Solved by PenkethBoy,

Recommended Posts

Alan1234

Hi, I receive the Internal Error 500 when I try to change the password to a user using a generate api key (Advance -> Api Key). Instead when I use the Api key that swagger use I don't have problems. 

 

I can use the swagger's api key, but it changes every 2 days. Anyone has a solution? Thanks

Link to comment
Share on other sites

PenkethBoy

use the /user/authenticatebyname end point

 

returns an access token - use this instead of the apikey generated via the UI

 

Swagger is only for testing not production - hence why the key changes

Link to comment
Share on other sites

Alan1234

When I try to generate it, I receive the error

 

"Value cannot be null. (Parameter 'appName')"

 

What is wrong?

Edited by Alan1234
Link to comment
Share on other sites

PenkethBoy

did you fill in the headers and body thats needed along with admin username and password

Link to comment
Share on other sites

Alan1234

did you fill in the headers and body thats needed along with admin username and password

 

Yes sure

 

My question is: Why the api that I generate doesn't work?5ed6a8452febd_emby.jpg

Edited by Alan1234
Link to comment
Share on other sites

Alan1234

Emby UserId="(guid)", Client="(string)", Device="(string)", DeviceId="(string)", Version="string", Token="(string)"

 

This is the appName? I can't understand. If yes, what I need to put in "Token" and "Version"?

Link to comment
Share on other sites

  • Solution
PenkethBoy

put this in the text box

Emby Client="Login-testing", Device="testing", DeviceId="4567", Version="1234"

add your admin user and password below that

 

and it will work

  • Like 1
Link to comment
Share on other sites

Alan1234

Yep, I have fix it, thanks to all. The error was that i put "Authorization=Emby Client="Login-testing", Device="testing", DeviceId="4567", Version="1234" " instead of "Emby Client="Login-testing", Device="testing", DeviceId="4567", Version="1234" "

 

I hope that this will help others too!! 

Link to comment
Share on other sites

PenkethBoy

becasue swagger adds the authorization to your string

 

but in your code you need to add that yourself

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...