Hi,
We could use some advice on the Authorization process for using the API. We would like to find a process that works with both older "legacy" accounts and with new Particle accounts.
What works:
Create a new account. Get a token with client ID / client secret of particle:particle
curl ``https://api.particle.io/oauth/token``
-u particle:particle
-d grant_type=password
-d "``username=newaccount@ourdomain.com``"
-d "password=<yourpasswordhere>"
{"token_type":"bearer","access_token":"ffffffff897cc2b320002ddd50000c86145346a8","expires_in":7776000,"refresh_token":"ffffffffa6d1ddd00015b0e95670000d18d2b53a"}
What fails:
Using the same technique on a legacy account fails.
curl ``https://api.particle.io/oauth/token``
-u particle:particle
-d grant_type=password
-d "``username=legacyaccount@ourdomain.com``"
-d "password=<yourpasswordhere>"
{"error":"invalid_grant","error_description":"User credentials are invalid"}
Is there a way to obtain an access token without having to create a client ID / client secret in a legacy account?