Using Secret Key for Units

I am trying to use secret_key in an Angaza Nexus api. But I am getting an error. According to Angaza Nexus API Documentation, I should be able to use secret_key in this API body.

Angaza Hub: https://payg.angazadesign.com/
API: PATCH https://payg.angazadesign.com/nexus/v1**/units/{unit_number}**
{
“serial_number”: “6060002500”,
“secret_key”: “31303332393161736466617364663161”

}
Response:
{
“context”: {
“argument_name”: “secret_key”,
“reason”: “Invalid field for this unit type”
}
}

Mahsum,

According to the latest documentation, you can only update the serial_number for this type of unit (activated through the RuralSpark API). The secret key is not used in the API interaction so we don’t allow it to be modified (it doesn’t matter).

If you made a Nexus Keycode unit then you could update secret_key.

Thanks,

Eric

Hi Eric,
Can’t we allow the secret_key field for spark devices as well. Because we are actually planning to use nexus keycodes for our spark devices.

And How can I create a nexus keycode unit?

Mahsum,

You need to make a new Angaza Keycode Product. Please follow the instructions here.

Then after you create units of that product, you can update the secret keys from their default values.

Thanks,

Eric

Eric,
I will follow the instructions in you comment.

Thank you so much.