Hello this is my current setup:
Organisation setup within Particle
Photon Board
I setup users through my own authentication system (firebase) and when new users are added I make this call : https://api.particle.io/v1/orgs/{org-slug}/customers with the body : {no_password: true, email: customer@email.com} which returns me an access token.
(The customer is not added to the organisation dashboard through, is this expected behaviour? or have I missed something?)
As I’m building in iOS I do the following:
let token // token provided by https://api.particle.io/v1/orgs/{org-slug}/customers
if SparkCloud.sharedInstance().injectSessionAccessToken(token) {
print("Injected Session Access Token")
if let setupController = SparkSetupMainController() {
setupController.delegate = self
SparkSetupCustomization.sharedInstance().organization = true
SparkSetupCustomization.sharedInstance().organizationName = "My organisation name"
SparkSetupCustomization.sharedInstance().organizationSlug = "My organisation slug" // Same as the one used in the above API Call
Problem is when I click “ready” I get the following error, (the iOS device is connected to wifi):
“Error - Could not communicate with Particle cloud, make sure your iOS device is connected to the internet and retry. (Request failed: bad request (400))” I’ve attached a photo.
If I removed the following lines, the error goes away (Is this correct? should I set the organisation details or not?):
SparkSetupCustomization.sharedInstance().organization = true
SparkSetupCustomization.sharedInstance().organizationName = "My organisation name"
SparkSetupCustomization.sharedInstance().organizationSlug = "My organisation slug" // Same as the one used in the above API Call
But another problem arises, after clicking “Ready” and connecting to the Photon board over Wifi I get the following error (this is when a different user tries to claim the same device)
Why is the ownership “null”? Am I missing something in the customer setup?