Would it be possible to provide a method to implement this into Cayenne dashboards?
If yes I could imagine that this would not be limited to a Wio Link device, but also to generic data inputs.
One completely different scenario that comes into my mind is the output from a Nagios plugin over the NCPA-Agent from their Web-API.
Welcome to the Cayenne community! Yep, that’s actually what we’re working on right now. We will open up an API for Cayenne, where you can GET and POST data to the dashboard from virtually any device or third party. Hope this helps.
I wanted to follow up with you here. We just released the Cayenne Beta MQTT API. You should be able to bring your board into Cayenne using this API. Would love if you gave it a try and update everyone on your progress! http://www.cayenne-mydevices.com/docs/#bring-your-own-thing-api
Hi:
I saw via this Jul16 post that you were developing an API were we would comunicate via HTTP POST or GET.
Do you know if this is ready, because I haven´t seen in the documentation yet? I have also the same problem with some devices that I can´t connect to Cayenne because the only communication they have is via HTTP (and no MQTT).
Many thanks.
Thanks a lot! Enjoying develop with cayenne. I just have another question. Now I got the token and can do communication with auth server. However, I can not connect with the general api server: platform.mydevices.com.
Hi @xiaozhiyong1988, thank you for your patience. I’ve asked one of our API developers to have a look at this latest post as I’m not familiar with it enough yet to know if that could be a typo (I don’t think so).
Hi @xiaozhiyong1988, thanks for raising this issue. Looks like it’s another typo as it should be https and not http. Platform and Auth should both have calls being made over https.
I have another question then. I use the authorization code that returns by the auth server to connect with the general api server and received an unauthorization message. https://auth.mydevices.com/applications —this one work with the returned JWT Token https://platform.mydevices.com/v1.1/things —this one does not work with the same JWT Token it says: unauthorization
thank you!
Did you use a response_type=code when logging into oauth/authorization?
If so, you should receive a code value as code={CODE VALUE}
You can then use that value to make POST call to `https://auth.mydevices.com/oauth/token’ with the following payload:
{
"client_id": "{your app key}",
"client_secret": "{your app secret}",
"code": "{your code value}",
"grant_type": "authorization_code",
"redirect_uri": "{redirect uri used when retrieving code}"
}
If successful, you’ll get an access_token in the response which will be authorized for https://platform.mydevices.com/
Another method is to use response_type=token which will then return an access_token value on a successful login to oauth/authorization
Thanks for your response. I did follow your instruction and get the access_token but it still return an unauthorized message when I am trying to connect platform. I was wondering I did not finish the initialization in auth. I am trying to run all the code listed in the manual with connect to auth server. When I start with post an user: https://auth.mydevices.com/users?first_name=***&last_name=**&email=**&password=**&application_id=**
it returns a message:
{
“statusCode”: 400,
“error”: “Bad Request”,
“message”: “"value" must be an object”,
“validation”: {
“source”: “payload”,
“keys”: [
“value”
]
}
}
I am changing the parameters to a json playroad it works with only return the token. Then I use: https://auth.mydevices.com/users to get the user I just posted and returns:
{
“statusCode”: 404,
“error”: “Not Found”
}
To use the token, use the following format when adding authorization: Bearer ACCESS_TOKEN. We’ll update the docs to reflect this.
As for creating users, the correct endpoint will be https://auth.mydevices.com/applications/{APP KEY}/users. For this, you will need the following json payload:
{
"email": "EMAIL",
"message": "message"
}
You should now view your created user when issuing a GET to /applications/{APP KEY}/users.
Although you can add a user to your application, you (or the user) will not be able to access the account yet as the API is still in Beta phase.