How to fix Philips Hue API v2 404 Not Found Error - philips-hue

Today, I wanted to try out the Philips Hue v2 CLIP API. I managed to fetch the credentials, but am stuck when I try to fetch the devices, as I'm getting a 404 Error.
Here is a Screenshot of the CLIP API Debugger:
And here is one of my browser:

Related

Azure Get Video Index or Get Project Index API response body is blank

This is about Azure Video Indexer API. I am using a trial account. (Using Corporate account to log in to the Video Indexer portal but using a trial, not a paid account yet). I uploaded a few videos using Indexer Portal. Then I am trying to use the Video Indexer API to get video index. The Get Video Index (or Get Project Index) APIs give proper response when called through the "Try it" panel of the Developer Portal. But when exactly same Get API is called through Java code, the response is blank. The response status is 200 OK. Response header also shows valid header as follows:
[Content-Length:"13052", Content-Type:"application/json; charset=utf-8", x-ms-request-id:"a747d33c-a1e8-444d-89ce-d49a531507c2", X-Content-Type-Options:"nosniff", Strict-Transport-Security:"max-age=31536000; includeSubDomains", api-supported-versions:"2.0", Access-Control-Allow-Credentials:"true", Date:"Thu, 27 Oct 2022 15:19:53 GMT"]
But response body just doesnt print anything.
(Just to repeat, the same Get API call works fine from the "Try it" panel using same/similar access token etc. But when called through Java code, it doesnt give back any response, not any error).
Any help would be highly appreciated.
I have already tried using the readily available Java code snippet provided in the "Try it" panel. But same behaviour.
Thanks.
mrisbud

Flutter not able to decode json data

I am currently learning flutter from a udemy course. Following the course now I am building a climate app using openweathermap.org's api. The app was working fine with default location of the emulator but then I followed my instructor and customized the app so that it can use the device current location but the app was not responding and was returning statusCode as 401. I tried running my instructor's code as well but the same problem was there as well so if anyone can tell me the reason of the statusCode being 401 because when I ran the url it gave the correct json data but I think android studio(Flutter) was not able to decode json data.
If someone can please justify the reason for the problem please respond.
Thankyou
This could be caused because of an invalid or bad API key. You can get an API key from the openweathermap.api.
Once it works it will return a 202 status code.

MS Teams | Microsoft bot framework - Returns 502 error on task/fetch

I have an MS Teams adapter written using the botframeworks sdk v4 for node js which works perfectly for normal conversations. But when I try to do a task/fetch, it returns an error message "Unable to reach app. Please try again." on the task module popup
I can see from the inspector that it returns 502 response for the request to invoke the task module
The task module returns a simple adaptive card and I can see that I get a callback on my handleTeamsTaskModuleFetch function from the logs
The adapter runs on a docker container with an nginx proxy and the nginx logs shows that, it returns a 200 response whenever I click on the task module launch button
I have a similar setup in my dev and taskmodule works perfect there
Any help is highly appreciated
Update
I have tried hardcoding the adaptive card. That doesnt help either
Eventually it was found that there was a problem with one of the csp headers and microsoft was not happy about it.
I removed the CSP headers and the taskmodule started working
Thanks to #gousia-msft for your help in debugging the issue

Azure Maps Fuzzy Search API (https://atlas.microsoft.com/search/fuzzy/json?) works on Postman but fails on Logic Apps

I started using the Azure Maps API on a project using Logic Apps (Azure). All of a sudden the HTTP action stopped working and I am getting a 400 BadRequest Error.
"error": {
"code": "400 BadRequest",
"message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive."
However, when I call the same API using Postman or my browser, it works fine.
API: https://atlas.microsoft.com/search/fuzzy/json?api-version=1.0&subscription-key=xxxxxxxxxxxxxxxxxxxxxxxxxxx&query=2 5 Donlands Ave 4 Toronto Toronto &countrySet=Ca&maxFuzzyLevel=2&limit=1
As I mentioned, this was working and all of a sudden started failing on Logic Apps without making any changes.
I exactly have the same issue.
I use address rest api to retrieve cities from postal code.
Sample :
https://atlas.microsoft.com/search/address/structured/json?subscription-key=mySubcriptionKey&api-version=1.0&postalcode=35000&countrycode=fr&limit=1
Like you, if I use the query client side, I have a 400 bad request with message :
{
"error": {
"code": "400 BadRequest",
"message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive."
}
}
Please note that the query is OK for google chrome, but return a 400 bad requests with Brave, Edge (chromium) and Firefox.
Note also that the sample web sdk have the same issue and is not updated.
Currently, I don't have any idea about where is the problem.
Edit : After some investigation, i'm pretty sure that it's a Microsoft issue.
So, I found a workaround.
If I try my query with Firefox, by default I have a 400 and a 200 with chrome.
I compare the header and the issue is with the accept-language.
By default, on Chrome, I Have : Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
On Firefox (Brave, Edge also maybe), I Have : Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
Please note the inversion between fr-FR and fr.
If I change my Accept-Language on Firefox from fr,fr-FR to FR-fr,fr. It's working.
If I set my Accept-Language to "fr" only, I still have a 400. Work with "Fr-fr".
So after some test, my conclusion is that atlas have an issue with two letter header accept-langage.
So on my TS/JS code, just add accept-language with 4 letters to work again.
xhr.open('GET', url, true);
xhr.setRequestHeader("Accept-Language", this.acceptLanguage);
xhr.send();
My opinion is that it's a server/ atlas issue, I can't imagine this kind of code evolution from Microsoft ^^

Instagram users/self/feed 404 errorcode

I am trying to get myself mediafeeds information with the following API (using JInstagram library):
https://api.instagram.com/v1/users/self/feed?access_token={valid access_token}
The response code is 404. I am not sure what I'm missing since the access_token is valid, the API is listed in the Ruby library, but it can't be found on the develop website.
I see there is a 404 error in this site for feeds to, but it are not same API.
Instagram changed their policy and also deprecated some APIs. Check the below link.
https://instagram.com/developer/changelog/
Old API
https://api.instagram.com/v1/users/self/feed?access_token={valid access_token}
Use the below API instead of the above one
https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS-TOKEN

Resources