Customer Creation Issue

I have created a Oauth ID and secret for my product and now am attempting to perform a customer creation.

I am using NodeJS to build a web app and a snippet of my HTTPS POST looks as follows:

      https.post('https://api.particle.io/v1/products/productHere-V1/customers',
      { user: 'productIDHere:IDSecretHere', no_password: true, email: 'test@test.com'
      },
      function(res){
           res.setEncoding('utf8');
            res.on('data', function(chunk) {
	              console.log(chunk);
               });
           });

When I attempt execute the code, an error is returned as: {error":“invalid_request”,“error_description”:“The access token was not found”}.

I suspect I am passing the ID and Secret wrong in the POST function but can’t quite figure it out.

Update: I was not using the correct names for the arguments. The correct arguments are found at https://docs.particle.io/reference/device-cloud/api/#create-a-customer---implicit

Note that [ 3. Create a Customer ] found here https://docs.particle.io/tutorials/device-cloud/authentication/#two-legged-implementation is misleading/lacking information.

Hi @klang - I’ve noticed the same thing w/r/t args and I think we’re doing some concurrent work on precisely this endpoint right now. Can I confirm that you are no longer blocked in this issue?

Hi @marekparticle - I am no longer blocked by this issue. Thanks.

1 Like