POST /v1/products/:productIdOrSlug/customers salt problem

POST-ing on URL:

https://api.particle.io/v1/products/10xxx/customers

with a payload like this:

{'email': 'e00xxx', 'password': 'password', 'no_password': True}

and getting:

{'ok': False, 'code': 400, 'error': 'The "salt" argument must be of type string or an instance of ArrayBuffer, Buffer, TypedArray, or DataView. Received undefined'}

'salt' is not mentioned in the Cloud API Reference.
Any ideas about what's wrong?

I believe the problem is that the value to no_password is converted to a JSON boolean, and true is lower-case and case-sensitive.

Or possibly that you can't include a password if you are using no_password.

1 Like

I'm creating customer for every device.
My program is in Python and the actual fragment is like this:

payload = {}
payload['email'] = core
payload['password'] = 'password'
payload['no_password'] = True
r = requests.post(url, auth=(credentials['clientid'], credentials['secret']), data=payload)

True <-> true conversion is done by requests.
This code fragment worked in this format for tens of other devices before but not last time. It should be connected somehow to a specific device, product, or customer.

The problem was that this customer already existed.