Custom Vision API Returning "code": "BadRequestImageUrl", "message": "Invalid image url" into Bot Framework Composer - bot-framework-composer

I am trying to use the .contentUrl from an image uploaded within Bot Framework composer with the Custom Vision API. I know the API is working as I have tested it elsewhere.
Here's my HTTP call:
HTTP call
And here's the returning message:
content": { "code": "BadRequestImageUrl", "message": "Invalid url: http://localhost:5000/v3/attachments/9bec26bb-c452-4a5c-abf8-fdc738438020/views/original"
When I click on the URL, it shows a black screen with a small white square, so is the Bot not creating a correct storage and URL for the image, rather than the API call being incorrect?

Related

No DesignTimeAgent found when testing with detectIntent API using prebuilt agent template and "try this API" button

Always return No DesignTimeAgent found (even using the prebuilt agent template) when testing with detectIntent API in DialogFlow using "Try this API". The API I tried is "projects.agent.sessions.detectIntent".
The session parameter is "projects/dialogflow-293106/agent/sessions/123123123"
and request body is:
{ "queryInput": {
"text": {
"text": "hi",
"languageCode": "en"
} } }
The following error returned:
{ "error": {
"code": 404,
"message": "com.google.apps.framework.request.NotFoundException: No DesignTimeAgent found for project 'dialogflow-293106'.",
"status": "NOT_FOUND" } }
screen cap of "Try this API" 1
screen cap of "Try this API" 2
There are multiple reasons why this error may occur for Dialogflow ES Edition. One is that for agents located in regions which are outside the US. At this point, the API Explorer for projects.agent.sessions.detectIntent doesn’t support other regions outside the US. Since to make an API request for other regions, you must add the location parameters to define the region. You may consider testing the detectIntent API method using other methods as described here.
This error may also occur if the project ID defined in the request is incorrect or doesn’t have an agent linked to it. To verify the project ID of the agent, you may check this information in the agent's general settings.
In addition to that, currently, the API Explorer for Dialogflow CX APIs is not available. Dialogflow ES and Dialogflow CX have different sets of API methods. If you are trying to call a CX agent using the detectIntent method for an ES agent, it will also return an error message. If you want to test your Dialogflow CX agent through REST API, you may check this documentation for an overview of API methods available.
Here’s the detectIntent request for Dialogflow CX agents. You can interact with the APIs as described in the link provided.

How to fetch media from the Instagram API

I'm trying to fetch media from an instagram account that I manage to display it on a website that I'm building:
Basically I want to run this query:
https://graph.instagram.com/{userId}/media?fields=id,caption,media_url&access_token=IGQ...
But as a response I get this error:
{
"error": {
"message": "Unsupported get request. Object with ID '31044158025' does not exist, cannot be loaded due to missing permissions, or does not support this operation",
"type": "IGApiException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "AOdEf2mCpah6zWwkEdiZU95"
}
}
I followed this guide from the official documentation to create the app on facebook developer account, get the access token etc.
I got the {userId} going on instagram and exploring the network requests from the developer tools (is there an easier way? :D)
Any help appreciated,
Thanks!
Matteo

LinkedIn V2 API return not found when called from Azure API Management

I am trying to call LinkedIn V2 API from Azure API Management, specifically the ugcPost API:
https://api.linkedin.com/v2/ugcPosts
When the ugcPost API is called from our personal computer, the API is able to return the response successfully. However, when we attempt to call the ugcPost from Azure API Management, it responds back with status 404 (Resource not found).
{
"serviceErrorCode": 0,
"message": "Resource ugcPosts does not exist",
"status": 404
}
Has anyone faced similar issue? Is there something in the LinkedIn Developer portal that we have to tweak for this to work?
Apparently, it is an issue with the URL configuration that somehow append my base API URL causing the final URL to be incorrect (e.g. https://api.linkedin.com/v2/ugcPosts/v2/ugcPosts).
After some URL reconfiguration, it is working fine now.

Unable to ping Authorize.Net webhook

I just started building a webhook following the documentation. I created a sample web api application and published to IIS with a valid url accessible from the internet.
I created a webhook on out authorize.net sandbox account and set the url. I am able to call the POST api method from inside the postman. But when I try to ping the webhook I get error as follow:
https://apitest.authorize.net/rest/v1/webhooks/70884522-6fe8-4e72-9c7e-15bf2b30f778/pings
{
"status": 500,
"reason": "PING_FAILED",
"message": "The ping operation failed with the status code 403",
"correlationId": "5d136ce8-406f-442e-9118-fdde36946d87",
"details": [
{
"message": "Error occured in connecting to the endpoint:http://staging4.dancecompgenie.com/api/Values/Post "
}
]
}
Here is the url on my server.
http://staging4.dancecompgenie.com/api/Values/Post
I am able to successfully call this url in postman and get the result.
I appreciate if you can help me solve the problem.

Media instagram endpoint not working - Invalid media id

I'm trying to use https://www.instagram.com/developer/endpoints/media/, but for every media id that I use I get always the same result :
{
"meta": {
"error_type": "APINotFoundError",
"code": 400,
"error_message": "invalid media id"
}
}
I'm getting the media id from another api service, for example:
https://api.instagram.com/oembed?url=http://instagr.am/p/fA9uwTtkSN/.
So in the response we can see ``"media_id":"558717847597368461_9538472"`, then I use that id in media endpoint and i get "invalid media id".
I was wondering if the api is having some problems or maybe I missing something.
I guess you are using a valid access token!
The app you are using, is it in Sandbox mode or live?
Instagram has recently changed the API endpoints. If your app is in Sandbox mode, only Sandbox user's media can be accessed.
If none of the above applies, contact Instagram! They can only help you.
Hope it helps!
You are maybe getting that error because the user that posted the media is a private user. That was my case.

Resources