Hi Particle Community,
My goal is to build an iOS app with two-legged authentication. I am unsure about the workflow, and I was hoping you could please help me.
Here’s my understanding of the workflow:
First, create a customer using the
https://api.particle.io/v1/orgs/my_organization/customersendpoint. This call requires parameters:
client_secret, “shadow” user
Upon success, this call returns an
refresh_tokenand expiration time. With this
access_token, you then make a request to the
https://api.particle.io/v1/orgs/my_organization/products/my_product/device_claimsendpoint to get the claim code.
This is where I’m stuck. So far, in my servers I have the “shadow” user,
access_tokenand claim code.
In the iOS app, I installed the Setup SDK. The Spark Setup Screen requires both an
password from the app’s customer. What password should the customer enter? The customer was created in the Cloud API without a password.
My attempt: I tried launching the
SparkSetupMainController with the “setupOnly” option, but then the wizard is unable to claim the device. Where do I pass the claim code I got from your API, to the
Thank you for your help, it would be greatly appreciated!