I wonder if I could get some thoughts on an API call I’m making to my console app ?
I’m currently developing a Xamarin application to manage my devices across multiple products as part of a University project.
First question :
I noticed that you can add a client to both your personal account, and individual products. If I set the authentication type to full access on my personal account, should I be able to manipulate all of the products I own too ? Or would I need to authenticate my app against the product too ?
My initial guess was the latter, meaning I would need to iterate over the products in my app, and have the user authorise each individual product in order to create the auth clients.
This leads onto my second question:
Second question :
I’m currently trying to get a list of products against my account (account client is authenticated with full rights), and despite my following the API documentation, I still seem to be getting empty products array. From the call below, is there something I’m missing ?
From my gathering, all I need to do is hit the following endpoint:
[GET] https://api.particle.io/v1/products with the access token as a header, no ?
This seems to always return an empty array.
I then decided to try and get an individual product by it’s slug, or id:
[GET] https://api.particle.io/v1/products/:slugOrId which also returns an empty products array.
Am I missing something in either the authentication process for accounts / products or the way I’m making my calls ?
Many thanks for your time,
Very happy to provide more details on the calls or development environment if needed
I can indeed retrieve single products by passing in the slug id… Small error on my end - still have issues retrieving the full list of products though.