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

Error using method 'timeman.close' #28

Open
indexptz opened this issue Dec 19, 2024 · 0 comments
Open

Error using method 'timeman.close' #28

indexptz opened this issue Dec 19, 2024 · 0 comments

Comments

@indexptz
Copy link

Hello.
I found a problem when using the 'timeman.close' method.
Please help. If you use this method with 1 parameter like this:

from bitrix24 import Bitrix24
bx24 = Bitrix24('https://******/rest/17/******/')
bx24.callMethod('timeman.close', {'USER_ID': 18})

There is a result. Everything works.
But, if you use several parameters:

bx24.callMethod('timeman.close', {'USER_ID': 18, 'TIME': '2024-12-19T14:00:00+03:00', 'REPORT': 'test'})

Then it ends with the error 'bitrix24.exceptions.BitrixError: HTTP error: 400'
(I can assume that the 'TIME' parameter is passed in the wrong format. There you can get the error 'Wrong datetime format'. But this is just my guess.)
From my observations, I will also say that if you use 'requests', when passing all the same parameters, there are no errors.

import requests
url = 'https://******/rest/17/******/timeman.close'
requests.post(url, {'USER_ID': 18, 'TIME': '2024-12-19T14:00:00+03:00', 'REPORT': 'test'})

It works.
Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant