Flower power authentication

i’m reading http://developer.parrot.com/docs/FlowerPower/#authentication

and trying to authenticate with:


But I am confused because when I signed up for the developer account, I was told my ‘’‘access code’’’ and ‘’‘secret access’’’ , not a ‘’‘client_id’’’ and ‘client_secret’’’

also i am not clear if the password is supposed to be the same password i use to log into this developer forum?

So I tried plugging in my ‘Access code’ for my ‘client_id’ (which is myemail@gmail.com) and I plugged in
’secret access’ for ‘client_secret’…

I end up with a URL that looks like this, and the response i am getting is error: invalid_grant

i’m also confused, what is my email address? there’s no way to see it under my parrot developer account, and the parrot device i think i registered with a different email address than what my parrot-developer-email, is this why i get invalid_grant ?

many thanks

1 Like

Hi, I meet the same problem with this, could you or someone else please tell me how to authenticate?

You have to download the Parrot Flower Power app and create an account. Don’t use any oAuth providers. Create an actual username (email) and password.

This credentials you use on the app become your “username” and “password” for the API request.

The client_id and client_secret are the credentials you received via email when you signed up for API access here: https://api-flower-power-pot.parrot.com/api_access/signup.

So the request ends up looking like:
data={‘grant_type’: ‘password’,
‘username’: username, <-- From APP
’password’: password, <-- From APP
’client_id’: client_id, <-- From API request email
’client_secret’: client_secret, <-- From API request email

Hope this helps! The documentation can definitely be more clear on this.

Thanks. This helped me get closer.
I was never emailed a ‘client_id’, the email only includes the ‘secret access’

I am still getting

"{"error": "invalid_grant"}",

For posterity, I have:

const request = require('request');

const url  = 'https://api-flower-power-pot.parrot.com/user/v1/authenticate';
const qs = 
  grant_type:     'password',
  username:       'khan',
  password:       '$my_password_to_login_to_forum.developer.parrot.com',
  client_id:         '$my_email_address_to_login_to_forum.developer.parrot.com',
  client_secret:  '$the_Secret_Access_emailed_to_me'

request.get({url:url,qs},function(err, r,b)
  if (err)

I am pretty sure the API end-point is expecting form data in the form &a=1&b=2&c=3, because I can do a simple CURL request in the form

When I try and curl the URL with stringified JSON in the URL, I get:
curl -i -H “Accept: application/json” “https://api-flower-power-pot.parrot.com/user/v1/authenticate?data={“grant_type”:“password”}

{“error”: “invalid_request”, “error_description”: “missing ‘grant_type’ parameter”}

which indicates to me that the end-point does not read ‘stringified JSON’, but rather 'form url encoded in the style ?a=1&b=2&c=3 etc…)