The call to authorization_api.create_authorization(authorization) should return a newly created token.
Actual behavior
authorization_api.create_authorization(authorization) fails with return code 400
invalid json structure: json: cannot unmarshal object into Go struct field postAuthorizationRequest.orgID of type platform.ID
Specifications
Code sample to reproduce problem
I followed the Python client tutorial and adapted
create_authorization
to my needs:Expected behavior
The call to
authorization_api.create_authorization(authorization)
should return a newly created token.Actual behavior
authorization_api.create_authorization(authorization)
fails with return code 400 invalid json structure: json: cannot unmarshal object into Go struct field postAuthorizationRequest.orgID of type platform.IDAdditional info
Authorization: {'created_at': None, 'description': 'Write permission for device_name to bucket_name.', 'id': None, 'links': None, 'org': None, 'org_id': 'my-org-id', 'permissions': [{'action': 'write', 'resource': {'id': 'my-bucket-id', 'name': None, 'org': None, 'org_id': 'my-org-id', 'type': 'buckets'}}], 'status': 'active', 'token': None, 'updated_at': None, 'user': None, 'user_id': None}
Traceback (most recent call last): File "C:\Users\EMnify\PycharmProjects\csv2influx\c_to_i\db\device.py", line 25, in create_authorization return authorization_api.create_authorization(authorization)