Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change existing user #37

Closed
Spp595 opened this issue Nov 16, 2024 · 7 comments
Closed

change existing user #37

Spp595 opened this issue Nov 16, 2024 · 7 comments
Assignees
Labels
question Further information is requested

Comments

@Spp595
Copy link
Contributor

Spp595 commented Nov 16, 2024

how can i change the expiration time of a link for an existing user?

Copy link

Thank you for opening an issue!
Please, first check our FAQ section in discussions to see if your question has already been answered.
You can also use Discussion if you have any questions or suggestions, while the Issues section is for bug reports and feature requests.

If you want to proceed with the issue, please provide the following information:
- Description of the issue
- Expected behavior
- Actual behavior
- Steps to reproduce the issue
- Python version
- OS
- py3xui version
- 3x-UI version
- Code snippet or a minimal example to reproduce the issue (if applicable)
- JSON representation of the request to the API (if applicable)

Thank you!

@iwatkot
Copy link
Owner

iwatkot commented Nov 16, 2024

@Spp595, hello!

Please clarify what is the "link" of a user?
Provide a screenshot of the feature in 3x-ui panel and it would be nice if you check the source API docs and point out on the exact parameter you need.

Sincerely

@Spp595
Copy link
Contributor Author

Spp595 commented Nov 16, 2024

I'm talking about expiry_time, I already found how)))

@Spp595 Spp595 closed this as completed Nov 16, 2024
@Spp595
Copy link
Contributor Author

Spp595 commented Nov 17, 2024

I found the function, but it does not work correctly, when I use api.client.update(client.id, client) it replaces the client value with those that I specified in the client class object, but is it possible to somehow add, change only one value without changing all?

@Spp595 Spp595 reopened this Nov 17, 2024
@Spp595
Copy link
Contributor Author

Spp595 commented Nov 17, 2024

Example:

    api = Api.from_env()
    api.login()
    client = api.client.get_by_email(email)
    client.id = uuid
    client.expiry_time = int(new_dt.timestamp() * 1000)
    api.client.update(client.id, client)

when I run this code the user's tg_id and flow are deleted

@iwatkot
Copy link
Owner

iwatkot commented Nov 17, 2024

@Spp595, please provide all the required information, which the bot suggested in the first comment.

‼️ Especially the payload of the request to the 3x-ui panel API.

Ensure that the payload has the required fields and they have the correct values. If they exist, and have correct values - then please report it as stated above.

Thank you
Sincerely

@iwatkot iwatkot self-assigned this Nov 17, 2024
@iwatkot iwatkot added the question Further information is requested label Nov 17, 2024
@iwatkot
Copy link
Owner

iwatkot commented Dec 8, 2024

Closed as stale.

@iwatkot iwatkot closed this as completed Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants