Safecast / safecastapi

The app that powers api.safecast.org
44 stars 25 forks source link

"Get your API key" needs to allow choice of device #121

Open seanbonner opened 11 years ago

seanbonner commented 11 years ago

API key needs to be device specific, and then tied to a user, not one per user.

If I have 3 devices, I need 3 API keys so that the API knows which device the data I'm submitting is from.

paulca commented 11 years ago

Or should you just specify the device ID when you submit via the API?

On Fri, May 3, 2013 at 5:42 PM, seanbonner notifications@github.com wrote:

API key needs to be device specific, and then tied to a user, not one per user.

If I have 3 devices, I need 3 API keys so that the API knows which device the data I'm submitting is from.

— Reply to this email directly or view it on GitHubhttps://github.com/Safecast/safecastapi/issues/121 .

Paul Campbell paul@hypertiny.ie


web http://hypertiny.ie blog http://www.pabcas.com twitter http://www.twitter.com/paulca github http://www.github.com/paulca phone +353 87 914 8162


seanbonner commented 11 years ago

No, because then that puts the onus on the users to make sure all these things are configured correctly and most people won't be able to do that. Just having people register a new device and getting a new API key for that keeps things simple for them.

On Fri, May 3, 2013 at 12:30 PM, Paul Campbell notifications@github.comwrote:

Or should you just specify the device ID when you submit via the API?

On Fri, May 3, 2013 at 5:42 PM, seanbonner notifications@github.com wrote:

API key needs to be device specific, and then tied to a user, not one per user.

If I have 3 devices, I need 3 API keys so that the API knows which device the data I'm submitting is from.

— Reply to this email directly or view it on GitHub< https://github.com/Safecast/safecastapi/issues/121> .

Paul Campbell paul@hypertiny.ie


web http://hypertiny.ie blog http://www.pabcas.com twitter http://www.twitter.com/paulca github http://www.github.com/paulca phone +353 87 914 8162


— Reply to this email directly or view it on GitHubhttps://github.com/Safecast/safecastapi/issues/121#issuecomment-17404166 .

Sean Bonner homebase http://seanbonner.com | twitter http://twitter.com/seanbonner | G+ https://plus.google.com/101629211371073711149/posts | SAFECASThttp://safecast.org

nokton commented 11 years ago

So when you upload a drive through the website, then you need to associate an API with that upload to capture with device you used - so we need that to be an input for the upload and store the API with the uploaded data for each row.

Pieter

On May 4, 2013, at 1:34 AM, seanbonner notifications@github.com wrote:

No, because then that puts the onus on the users to make sure all these things are configured correctly and most people won't be able to do that. Just having people register a new device and getting a new API key for that keeps things simple for them.

On Fri, May 3, 2013 at 12:30 PM, Paul Campbell notifications@github.comwrote:

Or should you just specify the device ID when you submit via the API?

On Fri, May 3, 2013 at 5:42 PM, seanbonner notifications@github.com wrote:

API key needs to be device specific, and then tied to a user, not one per user.

If I have 3 devices, I need 3 API keys so that the API knows which device the data I'm submitting is from.

— Reply to this email directly or view it on GitHub< https://github.com/Safecast/safecastapi/issues/121> .

Paul Campbell paul@hypertiny.ie


web http://hypertiny.ie blog http://www.pabcas.com twitter http://www.twitter.com/paulca github http://www.github.com/paulca phone +353 87 914 8162


— Reply to this email directly or view it on GitHubhttps://github.com/Safecast/safecastapi/issues/121#issuecomment-17404166 .

Sean Bonner homebase http://seanbonner.com | twitter http://twitter.com/seanbonner | G+ https://plus.google.com/101629211371073711149/posts | SAFECASThttp://safecast.org — Reply to this email directly or view it on GitHub.

seanbonner commented 11 years ago

Sure, but that can just be a dropdown menu on the drive upload page, people shouldn't need to know their API keys for that

On Fri, May 3, 2013 at 12:46 PM, Pieter Franken notifications@github.comwrote:

So when you upload a drive through the website, then you need to associate an API with that upload to capture with device you used - so we need that to be an input for the upload and store the API with the uploaded data for each row.

Pieter

On May 4, 2013, at 1:34 AM, seanbonner notifications@github.com wrote:

No, because then that puts the onus on the users to make sure all these things are configured correctly and most people won't be able to do that. Just having people register a new device and getting a new API key for that keeps things simple for them.

On Fri, May 3, 2013 at 12:30 PM, Paul Campbell notifications@github.comwrote:

Or should you just specify the device ID when you submit via the API?

On Fri, May 3, 2013 at 5:42 PM, seanbonner notifications@github.com wrote:

API key needs to be device specific, and then tied to a user, not one per user.

If I have 3 devices, I need 3 API keys so that the API knows which device the data I'm submitting is from.

— Reply to this email directly or view it on GitHub< https://github.com/Safecast/safecastapi/issues/121> .

Paul Campbell paul@hypertiny.ie


web http://hypertiny.ie blog http://www.pabcas.com twitter http://www.twitter.com/paulca github http://www.github.com/paulca phone +353 87 914 8162


— Reply to this email directly or view it on GitHub< https://github.com/Safecast/safecastapi/issues/121#issuecomment-17404166> .

Sean Bonner homebase http://seanbonner.com | twitter < http://twitter.com/seanbonner> | G+ https://plus.google.com/101629211371073711149/posts | SAFECASThttp://safecast.org — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/Safecast/safecastapi/issues/121#issuecomment-17405142 .

Sean Bonner homebase http://seanbonner.com | twitter http://twitter.com/seanbonner | G+ https://plus.google.com/101629211371073711149/posts | SAFECASThttp://safecast.org

haiyan commented 11 years ago

Why is there no device identifier in the log file? Seems like a useful thing to add to avoid future human error.

Sent from my iPhone

On 3 May 2013, at 18:53, seanbonner notifications@github.com wrote:

Sure, but that can just be a dropdown menu on the drive upload page, people shouldn't need to know their API keys for that

On Fri, May 3, 2013 at 12:46 PM, Pieter Franken notifications@github.comwrote:

So when you upload a drive through the website, then you need to associate an API with that upload to capture with device you used - so we need that to be an input for the upload and store the API with the uploaded data for each row.

Pieter

On May 4, 2013, at 1:34 AM, seanbonner notifications@github.com wrote:

No, because then that puts the onus on the users to make sure all these things are configured correctly and most people won't be able to do that. Just having people register a new device and getting a new API key for that keeps things simple for them.

On Fri, May 3, 2013 at 12:30 PM, Paul Campbell notifications@github.comwrote:

Or should you just specify the device ID when you submit via the API?

On Fri, May 3, 2013 at 5:42 PM, seanbonner notifications@github.com wrote:

API key needs to be device specific, and then tied to a user, not one per user.

If I have 3 devices, I need 3 API keys so that the API knows which device the data I'm submitting is from.

— Reply to this email directly or view it on GitHub< https://github.com/Safecast/safecastapi/issues/121> .

Paul Campbell paul@hypertiny.ie


web http://hypertiny.ie blog http://www.pabcas.com twitter http://www.twitter.com/paulca github http://www.github.com/paulca phone +353 87 914 8162


— Reply to this email directly or view it on GitHub< https://github.com/Safecast/safecastapi/issues/121#issuecomment-17404166> .

Sean Bonner homebase http://seanbonner.com | twitter < http://twitter.com/seanbonner> | G+ https://plus.google.com/101629211371073711149/posts | SAFECASThttp://safecast.org — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/Safecast/safecastapi/issues/121#issuecomment-17405142 .

Sean Bonner homebase http://seanbonner.com | twitter http://twitter.com/seanbonner | G+ https://plus.google.com/101629211371073711149/posts | SAFECASThttp://safecast.org — Reply to this email directly or view it on GitHub.

nokton commented 11 years ago

Device identifier is there, but users can change it to any number they like. So if the API key is register to a device which is resgistered to a user, then that ensures that we have a unique key for that device/user/measurement. Currently we control all devices and ID's but with nano's coming, that won;t be true anymore.

Now, when a user requests a new API key, we can register the type of the device and the serial number of the device. That way when a user uploads a file, the API key cen be auto selected based on the serial number, that is in the drive file.

Hope that clarifies ;)

Pieter

On May 4, 2013, at 2:11 AM, Haiyan Zhang notifications@github.com wrote:

Why is there no device identifier in the log file? Seems like a useful thing to add to avoid future human error.

Sent from my iPhone

On 3 May 2013, at 18:53, seanbonner notifications@github.com wrote:

Sure, but that can just be a dropdown menu on the drive upload page, people shouldn't need to know their API keys for that

On Fri, May 3, 2013 at 12:46 PM, Pieter Franken notifications@github.comwrote:

So when you upload a drive through the website, then you need to associate an API with that upload to capture with device you used - so we need that to be an input for the upload and store the API with the uploaded data for each row.

Pieter

On May 4, 2013, at 1:34 AM, seanbonner notifications@github.com wrote:

No, because then that puts the onus on the users to make sure all these things are configured correctly and most people won't be able to do that. Just having people register a new device and getting a new API key for that keeps things simple for them.

On Fri, May 3, 2013 at 12:30 PM, Paul Campbell notifications@github.comwrote:

Or should you just specify the device ID when you submit via the API?

On Fri, May 3, 2013 at 5:42 PM, seanbonner notifications@github.com wrote:

API key needs to be device specific, and then tied to a user, not one per user.

If I have 3 devices, I need 3 API keys so that the API knows which device the data I'm submitting is from.

— Reply to this email directly or view it on GitHub< https://github.com/Safecast/safecastapi/issues/121> .

Paul Campbell paul@hypertiny.ie


web http://hypertiny.ie blog http://www.pabcas.com twitter http://www.twitter.com/paulca github http://www.github.com/paulca phone +353 87 914 8162


— Reply to this email directly or view it on GitHub< https://github.com/Safecast/safecastapi/issues/121#issuecomment-17404166> .

Sean Bonner homebase http://seanbonner.com | twitter < http://twitter.com/seanbonner> | G+ https://plus.google.com/101629211371073711149/posts | SAFECASThttp://safecast.org — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/Safecast/safecastapi/issues/121#issuecomment-17405142 .

Sean Bonner homebase http://seanbonner.com | twitter http://twitter.com/seanbonner | G+ https://plus.google.com/101629211371073711149/posts | SAFECASThttp://safecast.org — Reply to this email directly or view it on GitHub. — Reply to this email directly or view it on GitHub.

haiyan commented 11 years ago

Hi Pieter,

Okay, I see. Want to make sure the upload user flow is as simple as possible.

So what would happen is:

  1. User goes to upload a drive file
  2. The file is processed and they can then edit the metadata
  3. The metadata form has an extra field 'Device ID' which has already been filled in with the detected ID from the file. This appears as a drop-down box of all the devices the user has previously registered.
  4. If the device is not recognised the user is prompted to register their device in an extra step.
  5. There really shouldn't be any need for a user to access their Device ID (or Device API key) or to know it since everything's being auto-detected.

Cheers (hope you're all well at the house!) Haiyan

Designer, Technologist, Maker of Things

Twitter: @haiyan https://twitter.com/haiyan Technology Blog: blog.failedrobot.com Food Blog: deliciouswanderings.com Please take part in our latest OpenIDEO http://openideo.com/ challenge to prevent atrocities herehttp://www.openideo.com/open/usaid-humanity-united/inspiration/

On Fri, May 3, 2013 at 7:25 PM, Pieter Franken notifications@github.comwrote:

Device identifier is there, but users can change it to any number they like. So if the API key is register to a device which is resgistered to a user, then that ensures that we have a unique key for that device/user/measurement. Currently we control all devices and ID's but with nano's coming, that won;t be true anymore.

Now, when a user requests a new API key, we can register the type of the device and the serial number of the device. That way when a user uploads a file, the API key cen be auto selected based on the serial number, that is in the drive file.

Hope that clarifies ;)

Pieter

On May 4, 2013, at 2:11 AM, Haiyan Zhang notifications@github.com wrote:

Why is there no device identifier in the log file? Seems like a useful thing to add to avoid future human error.

Sent from my iPhone

On 3 May 2013, at 18:53, seanbonner notifications@github.com wrote:

Sure, but that can just be a dropdown menu on the drive upload page, people shouldn't need to know their API keys for that

On Fri, May 3, 2013 at 12:46 PM, Pieter Franken < notifications@github.com>wrote:

So when you upload a drive through the website, then you need to associate an API with that upload to capture with device you used - so we need that to be an input for the upload and store the API with the uploaded data for each row.

Pieter

On May 4, 2013, at 1:34 AM, seanbonner notifications@github.com wrote:

No, because then that puts the onus on the users to make sure all these things are configured correctly and most people won't be able to do that. Just having people register a new device and getting a new API key for that keeps things simple for them.

On Fri, May 3, 2013 at 12:30 PM, Paul Campbell < notifications@github.com>wrote:

Or should you just specify the device ID when you submit via the API?

On Fri, May 3, 2013 at 5:42 PM, seanbonner < notifications@github.com> wrote:

API key needs to be device specific, and then tied to a user, not one per user.

If I have 3 devices, I need 3 API keys so that the API knows which device the data I'm submitting is from.

— Reply to this email directly or view it on GitHub< https://github.com/Safecast/safecastapi/issues/121> .

Paul Campbell paul@hypertiny.ie


web http://hypertiny.ie blog http://www.pabcas.com twitter http://www.twitter.com/paulca github http://www.github.com/paulca phone +353 87 914 8162


— Reply to this email directly or view it on GitHub<

https://github.com/Safecast/safecastapi/issues/121#issuecomment-17404166>

.

Sean Bonner homebase http://seanbonner.com | twitter < http://twitter.com/seanbonner> | G+ https://plus.google.com/101629211371073711149/posts | SAFECASThttp://safecast.org — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub< https://github.com/Safecast/safecastapi/issues/121#issuecomment-17405142> .

Sean Bonner homebase http://seanbonner.com | twitter < http://twitter.com/seanbonner> | G+ https://plus.google.com/101629211371073711149/posts | SAFECASThttp://safecast.org — Reply to this email directly or view it on GitHub. — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/Safecast/safecastapi/issues/121#issuecomment-17410244 .

nokton commented 11 years ago

Hi Haiyan, yes, that makes sense - no need to know the API key.

Ray suggested we generate a much shorter easy to type API key (e.g. Six char uppercase code) so this will help users when entering the code into the SAFECAST app. Alternately, people could log into the SAFECAST app with their account and select from their API keys. This will be best but needs to be coordinated with Nick.

Ray also recommended a less technical name for the "API key". For example we could call it Safecast Device key or something.

When registering a device, the fields we need:

We need one more field in the meta data that is mandatory for type of measurement: surface, air, sky. Sky is above 10000 feet, air between 1m- 1.5 m and surface within 10 cm (guideline). So it could be detected from the height. Based on this the data should be split into layers for the Geosense map. (I believe we have this in github as a task)

(Yes, we all are well and successfully flew the first mission with bGeigie nano on Friday afternoon!! Am now on the way home)

Pieter

Nokton Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On 2013年5月3日Friday at 17:11, Haiyan Zhang wrote:

Hi Pieter,

Okay, I see. Want to make sure the upload user flow is as simple as
possible.

So what would happen is:

  1. User goes to upload a drive file
  2. The file is processed and they can then edit the metadata
  3. The metadata form has an extra field 'Device ID' which has already been
    filled in with the detected ID from the file. This appears as a drop-down
    box of all the devices the user has previously registered.
  4. If the device is not recognised the user is prompted to register their
    device in an extra step.
  5. There really shouldn't be any need for a user to access their Device ID
    (or Device API key) or to know it since everything's being auto-detected.

Cheers (hope you're all well at the house!)
Haiyan

Designer, Technologist, Maker of Things

Twitter: @haiyan https://twitter.com/haiyan
Technology Blog: blog.failedrobot.com
Food Blog: deliciouswanderings.com
*Please take part in our latest OpenIDEO http://openideo.com/ challenge
to prevent atrocities
herehttp://www.openideo.com/open/usaid-humanity-united/inspiration/

On Fri, May 3, 2013 at 7:25 PM, Pieter Franken notifications@github.comwrote:

Device identifier is there, but users can change it to any number they
like. So if the API key is register to a device which is resgistered to a
user, then that ensures that we have a unique key for that
device/user/measurement. Currently we control all devices and ID's but with
nano's coming, that won;t be true anymore.

Now, when a user requests a new API key, we can register the type of the
device and the serial number of the device. That way when a user uploads a
file, the API key cen be auto selected based on the serial number, that is
in the drive file.

Hope that clarifies ;)

Pieter

On May 4, 2013, at 2:11 AM, Haiyan Zhang notifications@github.com
wrote:

Why is there no device identifier in the log file? Seems like a useful
thing to add to avoid future human error.

Sent from my iPhone

On 3 May 2013, at 18:53, seanbonner notifications@github.com wrote:

Sure, but that can just be a dropdown menu on the drive upload page,
people
shouldn't need to know their API keys for that

On Fri, May 3, 2013 at 12:46 PM, Pieter Franken <
notifications@github.com>wrote:

So when you upload a drive through the website, then you need to
associate
an API with that upload to capture with device you used - so we need
that
to be an input for the upload and store the API with the uploaded
data for
each row.

Pieter

On May 4, 2013, at 1:34 AM, seanbonner notifications@github.com
wrote:

No, because then that puts the onus on the users to make sure all
these
things are configured correctly and most people won't be able to
do
that.
Just having people register a new device and getting a new API key
for
that
keeps things simple for them.

On Fri, May 3, 2013 at 12:30 PM, Paul Campbell <
notifications@github.com>wrote:

Or should you just specify the device ID when you submit via the
API?

On Fri, May 3, 2013 at 5:42 PM, seanbonner <
notifications@github.com>
wrote:

API key needs to be device specific, and then tied to a user,
not
one
per
user.

If I have 3 devices, I need 3 API keys so that the API knows
which
device
the data I'm submitting is from.


Reply to this email directly or view it on GitHub<
https://github.com/Safecast/safecastapi/issues/121>
.

Paul Campbell
paul@hypertiny.ie


web http://hypertiny.ie
blog http://www.pabcas.com
twitter http://www.twitter.com/paulca
github http://www.github.com/paulca
phone +353 87 914 8162



Reply to this email directly or view it on GitHub<

https://github.com/Safecast/safecastapi/issues/121#issuecomment-17404166>

.

Sean Bonner
homebase http://seanbonner.com | twitter <
http://twitter.com/seanbonner> |
G+ https://plus.google.com/101629211371073711149/posts |
SAFECASThttp://safecast.org

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub<
https://github.com/Safecast/safecastapi/issues/121#issuecomment-17405142>
.

Sean Bonner
homebase http://seanbonner.com | twitter <
http://twitter.com/seanbonner> |
G+ https://plus.google.com/101629211371073711149/posts |
SAFECASThttp://safecast.org

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com/Safecast/safecastapi/issues/121#issuecomment-17410244
.

— Reply to this email directly or view it on GitHub (https://github.com/Safecast/safecastapi/issues/121#issuecomment-17418482).

seanbonner commented 9 years ago

Reread this and not sure what we decided?