Jump to content

create a new user with emby api


slove

Recommended Posts

slove

"I want to use the Emby API to create a new user and copy configurations from a specified user. Does the official API support this?"

Link to comment
Share on other sites

hthgihwaymonk

you'll want to look at the `emby/Users/New` endpoint and in the payload include at least -
 

"CopyFromUserId": "{specified user}",
"UserCopyOptions": [
"UserPolicy"
]

 

Edited by hthgihwaymonk
  • Thanks 1
Link to comment
Share on other sites

slove
1 hour ago, hthgihwaymonk said:

you'll want to look at the `emby/Users/New` endpoint and in the payload include at least -
 

"CopyFromUserId": "{specified user}",
"UserCopyOptions": [
"UserPolicy"
]

 

Thank you very much for your response. I know how to create users, open-source specified copying of specified user policies, but there is no copying of user configurations.

Link to comment
Share on other sites

hthgihwaymonk

what type of configurations are you wanting to copy ?

 

Link to comment
Share on other sites

slove
22 minutes ago, Happy2Play said:

I will guess the example is just not showing you both options.  So add "UserConfiguration"

Enum UserCopyOptions (emby.media)

{
  "Name": "string",
  "CopyFromUserId": "d6394c9ad8b14e77b458bff6df92176c",
  "UserCopyOptions": [
    "UserPolicy"
  ],[
    "UserConfiguration"
  ]
}

I don't know what the format of UserConfiguration is.

Link to comment
Share on other sites

bakes82

So use the UI and look at the post call it pretty much tells you what you need to do:

 

{
  "Name": "string",
  "CopyFromUserId": "string",
  "UserCopyOptions": [
    "UserPolicy", "UserConfiguration"
  ]
}

Link to comment
Share on other sites

Happy2Play
8 minutes ago, slove said:
{
  "Name": "string",
  "CopyFromUserId": "d6394c9ad8b14e77b458bff6df92176c",
  "UserCopyOptions": [
    "UserPolicy"
  ],[
    "UserConfiguration"
  ]
}

I don't know what the format of UserConfiguration is.

I just tested this

{
  "Name": "NEW",
  "CopyFromUserId": "{myuserid}",
  "UserCopyOptions": [
    "UserConfiguration",
    "UserPolicy"
  ]
}

 

Link to comment
Share on other sites

slove
3 minutes ago, Happy2Play said:

I just tested this

{
  "Name": "NEW",
  "CopyFromUserId": "{myuserid}",
  "UserCopyOptions": [
    "UserConfiguration",
    "UserPolicy"
  ]
}

{
  "Name": "NEW",
  "CopyFromUserId": "d6394c9ad8b14e77b458bff6df92176c",
  "UserCopyOptions": [
    "UserConfiguration",
    "UserPolicy"
  ]
}This error message translates to: "Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."

 

Link to comment
Share on other sites

Happy2Play
21 minutes ago, slove said:

Emby Server 4.8.0.56 

Is there a reason you are on what I believe is an obsolete beta version?

Link to comment
Share on other sites

slove
On 4/4/2024 at 2:40 AM, hthgihwaymonk said:

what type of configurations are you wanting to copy ?

 

Thank you very much for your response

Link to comment
Share on other sites

slove
On 4/4/2024 at 3:49 AM, Happy2Play said:

Is there a reason you are on what I believe is an obsolete beta version?

thanks for you help

Link to comment
Share on other sites

Hi, have you updated to the latest build?

Link to comment
Share on other sites

slove
8 hours ago, Luke said:

Hi, have you updated to the latest build?

There is a question, create a new user, copy the user policy and configuration from the specified user, what is the minimum version supported, what is the format?

{
  "Name": "NEW",
  "CopyFromUserId": "d6394c9ad8b14e77b458bff6df92176c",
  "UserCopyOptions": [
    "UserConfiguration",
    "UserPolicy"
  ]
} or

{
  "Name": "NEW",
  "CopyFromUserId": "d6394c9ad8-b14e-77b4-58bf-f6df92176c",
  "UserCopyOptions": [
    "UserConfiguration",
    "UserPolicy"
  ]
}

 

Which is correct

Link to comment
Share on other sites

Happy2Play

Did you update to current release/current beta?  Or are you still on old beta 4.8.0.56?

But I would say what does the userid look like via the api when you query that user?

Link to comment
Share on other sites

slove
Posted (edited)

My server is Arm64 (aarch64), I chose docker and installed the version is 4.8.0.56, not sure the latest version supports arm64, so, I didn't upgrade

 

Edited by slove
Link to comment
Share on other sites

slove
16 minutes ago, Happy2Play said:

Did you update to current release/current beta?  Or are you still on old beta 4.8.0.56?

But I would say what does the userid look like via the api when you query that user?

My server is Arm64 (aarch64), I chose docker and installed the version is 4.8.0.56, not sure the latest version supports arm64, so, I didn't upgrade

Link to comment
Share on other sites

57 minutes ago, slove said:

My server is Arm64 (aarch64), I chose docker and installed the version is 4.8.0.56, not sure the latest version supports arm64, so, I didn't upgrade

HI, the latest version does support aarch64.

Link to comment
Share on other sites

slove
22 minutes ago, Luke said:

HI, the latest version does support aarch64.

 

create a new user using the API, copy the user policy and configuration from the specified user, what is the minimum version supported

Link to comment
Share on other sites

50 minutes ago, slove said:

 

create a new user using the API, copy the user policy and configuration from the specified user, what is the minimum version supported

That was added during 4.7 development. I don't remember exactly which 4.7.X version it was. Probably around 4.7.9.

Link to comment
Share on other sites

slove
On 4/6/2024 at 2:03 PM, Luke said:

That was added during 4.7 development. I don't remember exactly which 4.7.X version it was. Probably around 4.7.9.

thanks

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...