'unauthorized user' reponse from philips-hue bridge - philips-hue

Now I'm trying to control Hue bridge with IoTivity framework.
When I send GET message from MPMClientSample (MiniPluginManager)
response message was
[{
"error": {
"type": 1,
"address": "/lights",
"description": "unauthorized user"
}
}]
What should I use 'username' for this?
Now I'm using 'newdeveloper' as default value.

I found a solution.
https://developers.meethue.com/develop/get-started-2/
refer the document from developers page.
I could get generated username from hue bridge.
'We need to use the randomly generated username that the bridge creates for you. Fill in the info below and press the POST button.'
'When you press the POST button you should get back an error message letting you know that you have to press the link button. This is our security step so that only apps you want to control your lights can. By pressing the button we prove that the user has physical access to the bridge.'
'Go and press the button on the bridge and then press the POST button again and you should get a success response like below.'

Related

How do I invoke Link Update Mode in the Plaid Sandbox Quickstart app (node.js)?

I have the Plaid Quickstart (node) up and running.
I successfully logged in to one of the sandbox institutions (First Platypus Bank) using the sandbox credentials and got the access_token which it generated.
Per the Link Update Mode docs (https://plaid.com/docs/link/update-mode/), you should be able to "force a given Item into an ITEM_LOGIN_REQUIRED state".
From the docs I linked to above...
Update mode can be tested in the Sandbox using the /sandbox/item/reset_login endpoint, which will force a given Item into an ITEM_LOGIN_REQUIRED state.
I used Postman (in the Sandbox Public environment) to send an API call to this endpoint, https://sandbox.plaid.com/sandbox/item/reset_login, to force the ITEM_LOGIN_REQUIRED state.
This is the body sent with the API call...
{
"client_id": "{{client_id}}",
"secret": "{{secret_key}}",
"client_name": "Insert Client name here",
"country_codes": ["US"],
"language": "en",
"user": {
"client_user_id": "unique_user_id"
},
"access_token": "{{access_token}}"
}
This is the response I got back...
{
"expiration": "2021-02-13T04:13:12Z",
"link_token": "link-sandbox-7d82e9b8-b8a7-4977-9c20-aadbc82ec050",
"request_id": "eE56J8f5XJKpS6L"
}
...which is what I expected.
I then went back in to the Quickstart app and logged in to the "First Platypus Bank" again expecting to be prompted for the MFA challenges, but, instead, it just created a new access_token.
So, how to I get the Plaid Quickstart app into Link Update mode?
Update:
Per Alex's question, here is an image showing the Postman call I made. He's correct, it was a /link/token/create call. What's confusing it that it's labeled Create Link Token - Update Mode.
Update 2:
Here's the /sandbox/item/reset_login call and response. There's no link_token included in the response.
Update 3:
Between Alex's help and some help from Plaid support, I got this working.
I was putting the link token in the wrong place.
For anyone seeing this in the future, here are the steps you need to follow to get the node quickstart app into Link Update Mode.
You can also watch this video to see a demo of the process; HOWEVER, note that in the video, I put the link_token in the wrong place. The instructions below show how to put it in the correct place.
Get the access_token for the institution you want to get into Link Update Mode (this assumes you have the quickstart app installed, up and running. See... https://plaid.com/docs/quickstart/)
Start the quickstart backend (/quickstart/node/start.sh)
Start the quickstart frontend (cd /quickstart/frontend; npm start;)
Once the frontend fires up on port 3000 in your browser, click the "Launch Link" button then click "Continue".
Search for the institution (e.g., First Platypus Bank, First Gingham Credit Union...if in sandbox mode. or your own institution if in dev mode)
Enter your credentials (user_good/pass_good ...if in sandbox mode)
Copy the access_token
Close the Plaid browser tab
In Postman (to set this up, see... https://github.com/plaid/plaid-postman), enter the access token you just copied into the access_token variable (See the first screenshot above. Click on the icon near the upper right-hand side that looks like an eye then scroll down to access_token and enter it.)
Run the /sandbox/item/reset_login endpoint. It's labeled "Simulate ITEM_LOGIN_REQUIRED [Sandbox only]" in Postman. The request body should look like second screenshot above. Once you Send the request, the response body should show "reset_login": true. Now the Plaid Item (i.e., the institution) is in ITEM_LOGIN_REQUIRED mode.
Run the /link/token/create endpoint. It's labeled "Create Link Token - Update Mode" in Postman. The request body should look like the first screenshot above. Once you Send the request, the response body should give you a link_token. Copy it for the next step.
Put the link_token in the Plaid quickstart app.
On line 23 in /quickstart/frontend/src/App.tsx, replace data.link_token with your link_token. So this dispatch({ type: "SET_STATE", state: { linkToken: data.link_token } }); becomes this dispatch({ type: "SET_STATE", state: { linkToken: "link-sandbox-704ef648-2acd-44a2-867b-ea1258e9205c" } }); (Use your own link_token, of course, and don't forget the quotes around your link_token.)
Restart the backend and frontend. When you launch Link, it should now be in Link Update Mode.
The process you describe sounds right, but the API request and response bodies in your post are the request and response for /link/token/create, not /sandbox/item/reset_login. Can you verify that you didn't accidentally call /link/token/create instead of calling /sandbox/item/reset_login?

IFTTT Webhooks - Not receiving email (but the response says that it was sent)

I'm following this tutorial to send email in App Inventor: https://www.hackster.io/taifun/trigger-ifttt-to-send-an-email-using-app-inventor-9df505 (You will have to scroll down on the page to view the tutorial)
The tutorial is straight forward and easy to understand. However, the IFTTT service (Maker) is now called "Webhooks".
I don't know what else has changed since that tutorial was written.
Following the tutorial:
the URL is correct https://maker.ifttt.com/trigger/Sendmail/with/key/*MYKEY*
the RequestHeaders are correct Content-Type: application/json
the PostText is correct: { "value1" : "faeryofiris#gmail.com", "value2" : "test", "value3" : "test body" }
I have double and triple checked for spelling errors.
Once I click a button to send this email, I receive the response:
"Congratulations! You've fired the Sendmail event!"
Except... there is no email. Both emails are my actual emails, so they are valid emails. "faeryofiris#gmail.com" should be the "FROM" email, and "pixiibomb#gmail.com" is the email that is registered on IFTTT (this should be the email that receives a message from faeryofiris) I keep refreshing my gmail, and still... no email.
Any ideas?
I've run into this issue several times. The solution has always been to click "Edit Connection" on the Webhooks Service Settings page. This will get you a new key. It doesn't solve their issue which is that keys tend to die for no explained reason but it should get your setup working again.

Creating new task through WebHook with Asana API

I am working with a form system very similar to WUFOO that allows me to send data to an external website using WebHooks.
I have been able to connect my form to my ASANA system through Zapier but I cannot seem to get the API system to operate correctly. Can someone please advise or assist me on what I am doing incorrectly here?
In the screenshot note the following:
- Web URL functions for any web URL (https or http)
- HTTP method has POST, PUT, or GET options
- Data format allows me to input virtually anything so I can match up form fields with any necessary names for ASANA.
I simply cannot get the system to connect to ASANA. Please help me.
Screen shot of WebHook Options
I don't have access to your exact form builder but assuming it does what it says it is doing you can try the following. I'll use creating a task as an example.
Create a personal access token in Asana. To do this log in to Asana, click the icon in the top right corner and open "My profile settings". Go to the apps tab and create a personal access token. You will only ever see this token once so create a new one if you lose it. Also retrieve your workspace id, you can get it by opening app.asana.com/api/1.0/workspaces while logged in.
Now back to your form. For the website url place the specific endpoint you want to hit at Asana. For example, lets create a new task:
https://app.asana.com/api/1.0/tasks
Under the HTTP Method you want to select POST
Under the HTTP Headers you want to specify something like (replace 0/1234abcd with your access token):
{
"Authorization": "Bearer 0/1234abcd",
"Content-Type": "application/json"
}
You can use Send Raw Data and specify something like the following in the raw data section (replace 1234 with your workspace id):
{
"data": {
"workspace": 1234,
"name": "The name of the task"
}
}
You can of course add other fields- please see the API reference for more information:
https://asana.com/developers/api-reference/tasks
Let me know if that works for you.

Docusign Modify Existing Tabs Request - Unable to Modify Existing Radio Tab

We are trying to set a Radio button to be selected initially when an envelope is created based on certain conditions outside of Docusign.
Testing using the following URL and request body.
https://demo.docusign.net/restapi/v2/accounts/163051/envelopes/49c4ebeb-331d-4cf9-bce7-843be646fbd5/recipients/1/tabs
Body:
{
"accountId":"163051",
"envelopeId":"49c4ebeb-331d-4cf9-bce7-843be646fbd5",
"radioGroupTabs":[
{"documentId":"1","groupName":"RadioGroup","radios":[
{"pageNumber":"2","selected":"True","tabId":"04ad92ed-377b-4389-8ec0-93999385c3f6"}
],
"recipientId":"1"}
],
"recipientId":"1"}
Even though we only have 1 radio tab, we receive this response:
{"errorCode": "INVALID_TAB_OPERATION",
"message": "The Tab specified is not valid for the requested operation. Attempt to create 'text' tab from invalid tab type."}
Why are we getting this response? We have checked and the RadioGroup, tabId, envelopeId, accountId are all valid.
Thanks for your post, looks like you've identified an api bug with the platform. In testing I've found that I can modify other tabs just fine (such as dateSigned for instance) but there seems to be a problem modifying existing radio button tabs.
I've logged a bug with DocuSign, not sure when it will be fixed though. The August release just came out so hopefully by the September release. Will post here once resolved.

Error in SPUtility send email

I am trying to send an email in the button click event in the webpart.However, the email sending is failed and error is logged in both sharepoint logs and event viewer of the machine.
The error is : Cannot connect to SMTP host
Outgoing email settings in central admin is already configured. Alerts are also working fine.
Below is my code:
StringDictionary headers = new StringDictionary();
headers.Add("to", "someone#abc.com");
headers.Add("from", "MySharePointEmail#myfatblog.co.uk");
headers.Add("subject", "How to use SendEMail from SPUtility");
headers.Add("content-type", "text/html");
string bodyText = "This is the body of my email, in html format.";
SPUtility.SendEmail(SPContext.Current.Web, headers, bodyText);
Thanks in advance
Try running your code without the System Account (if you are).
Try also disabling the LoopbackCheck:
To set the DisableLoopbackCheck registry key, follow these steps:
Click Start, click Run, type regedit, and then click OK.
In Registry Editor, locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Right-click Lsa, point to New, and then click DWORD Value.
Type DisableLoopbackCheck, and then press ENTER.
Right-click DisableLoopbackCheck, and then click Modify.
In the Value data box, type 1, and then click OK.
Quit Registry Editor, and then restart your computer.
I got that fixed. Anti virus was causing the problem. But i am wondering how is SharePoint able to send mail then?

Resources