Power Automate HTTP Failure Invalid value for header Content-Language. - Ebay API - api

Using test listing information I'm trying to send a http put request to eBay using powerautomate. To set up my HTTP action I've followed the API instructions for the createOrReplaceInventoryItem action.
Ebay API Documentation
I continue to get the below error:
{"errors":[{"errorId":25709,"domain":"API_INVENTORY","subdomain":"Selling","category":"REQUEST","message":"Invalid
value for header Content-Language."}]}
I have read many articles where they have suggested changing Content-Language to Accepted-Language but that has not resolved the issue. Another article said to assign it to the HTTPContent instance but I'm unaware how to do this within powerapps.
Link to Suggestion on this thread
Here is the Request:
{
"uri": "https://api.ebay.com/sell/inventory/v1/inventory_item/TestMonkey",
"method": "PUT",
"headers": {
"Authorization": "*sanitized*",
"Content-Language\t": "en_US",
"Content-Type": "application/json",
"X-EBAY-C-MARKETPLACE-ID": "EBAY_US"
},
"body": {
"availability": {
"shipToLocationAvailability": {
"quantity": 50
}
},
"condition": "NEW",
"product": {
"title": "GoPro Hero4 Helmet Cam",
"description": "New GoPro Hero4 Helmet Cam. Unopened box.",
"aspects": {
"Brand": [
"GoPro"
],
"Type": [
"Helmet/Action"
],
"Storage Type": [
"Removable"
],
"Recording Definition": [
"High Definition"
],
"Media Format": [
"Flash Drive (SSD)"
],
"Optical Zoom": [
"10x"
]
},
"brand": "GoPro",
"mpn": "CHDHX-401",
"imageUrls": [
"https://coolbackgrounds.io/images/backgrounds/white/pure-white-background-85a2a7fd.jpg"
]
}
}
How should I configure the Content-Language header value in powerautomate?
Thank you in advance.

Related

Vonage WhatsApp messages suddenly stopped working

I have recently joined a company that is using Vonage and we have WhatsApp communications which was working fine in both dev and production that have both suddenly stopped working.
The shape of the incoming json looks to have changed significantly, but I have changed the code that is reading this and am able to read the messages into the system.
The problem that I have now, is outgoing message is not being accepted.
If I send this json body over
{
"from": "4474183xxxxx",
"to": "4474719xxxxx",
"message": {
"Type": "text",
"content": "Hello! I’m CAI, A Virtual Chat-bot assistant. blurb, more blurb.... .\n\n1. Okay I understand\n\nChoose any one option. Type \"1\" to choose first option."
}
}
I get the following response
{
"Status": "fail", // custom one to my company
"e3": {
"Error": {
"body": {
"type": "https://developer.vonage.com/api-errors",
"title": "Your request parameters didn't validate.",
"detail": "Found errors validating 1 of your submitted parameters.",
"invalid_parameters": [
{
"name": "to",
"reason": "Malformed JSON body."
}
],
"instance": "cf4bce73-2db5-4102-b7af-xxxxxx"
},
"headers": {
"date": "Wed, 02 Nov 2022 14:02:08 GMT",
"content-type": "application/problem+json",
"content-length": "287",
"connection": "close",
"x-envoy-upstream-service-time": "3",
"x-frame-options": "deny",
"x-xss-protection": "1; mode=block",
"strict-transport-security": "max-age=31536000; includeSubdomains",
"x-content-type-options": "nosniff",
"server": "envoy"
},
"statusCode": 400
},
"StatCode": 400,
"Response": null
},
"a": {
"label": 6,
"trys": [
[
0,
6,
null,
7
]
],
"ops": []
}
}
However, looking at the shape of the message that is on the website (https://dashboard.nexmo.com/messages/sandbox) and send this message
{
"from": "xxxx",
"to": "xxxx",
"message_type": "text",
"text": "Hello! I’m CAI, blurb... .\n\n1. Okay I understand\n\nChoose any one option. Type \"1\" to choose first option.",
"channel" : "whatsapp"
}
I get this response
{
"Status": "fail",
"e3": {},
"a": {
"label": 6,
"trys": [
[
0,
6,
null,
7
]
],
"ops": []
},
"Message": "Cannot read property 'Type' of undefined"
}
I would be grateful if someone could help me shape the message that needs to be sent to vonage to that this can be sent out to the end user \ recipient correct.
Thanks
Simon

Sandbox access token not working [Easyship]

We have to try to integrate Easyship courier API. And We are facing the below issue.
{
"rates": [],
"messages": [
"Sorry, we couldn't find any shipping solutions based on the information provided."
]
}
For more information, I have shared the request parameter and API response.
API URL:- https://api.easyship.com/v2/rates
Request Parameter:
{
"origin_address": {
"postal_code": "91601",
"city": "Los Ángeles",
"state": "CA",
"country_alpha2": "US"
},
"destination_address": {
"postal_code": "95140",
"city": "Mount Hamilton",
"state": "CA",
"country_alpha2": "US"
},
"parcels": [
{
"total_actual_weight": 5,
"items": [
{
"quantity": 1,
"category": "mobile_phones",
"dimensions": {
"width": 10,
"height": 10,
"length": 25
},
"description": "Apple iPad",
"actual_weight": 5,
"declared_currency": "USD",
"declared_customs_value": 49500.55
}
]
}
]
}
Response Parameter:
{
"status": "failure",
"errors": [
"Sorry, we couldn't find any shipping solutions based on the information provided."
],
"request_id": "545b5f76a41e2994a13f384559dee625",
"timestamp": "2022-10-12T10:09:21.272Z"
}
Note:
This request parameter works with the production access token.
We have applied all possible solutions for this issue but didn't find anything.
Also we don't want to use the production access token because we are in the developing stage. so please please provide working with a sandbox solution.

Power Automate HTTP Request POST ends with "Internal Server Error"

I'm not sure why I face an "Internal Server Error" when I send an POST Request with Power Automate, but if I send the same request with Postman it works just fine. As you can see the flow tried 4 times until it stopped. I call the same REST API with Postman and it works without problems. The Authorization is by the way Basic with Username and Password.
This is the response from Postman when I send the POST request:
{
"executionTime": 3360,
"hints": [
{
"id": "STRING",
"name": "STRING",
"type": "GROUP_HINT",
"locations": [
{
"tokens": [
{
"start": 33,
"end": 41
},
{
"start": 61,
"end": 66
}
],
"score": 1.0,
"distance": 0,
"groupValue": {
"left": "STRING",
"right": "STRING"
}
}
],
"groupElement": [
"MATCHED GROUPS"
],
"range": 20
}
],
"businessCases": [
{
"businessCaseId": "ee05f8f9-e18d-4bf7-b7db-4c8bc800615a",
"name": "STRING",
"score": 0.53,
"hintCount": 1596,
"originCount": 241,
"matchedHints": [
"MATCHED GROUPS"
],
"matchedBoostedHints": [
"MATCHED GROUPS"
],
"origins": [],
"matchedOrigins": [
"MATCHED GROUPS"
],
"matchedBoostedOrigins": [
"MATCHED GROUPS"
],
"unmatchedOrigins": []
}
],
"questions": [],
"extractedValues": []
}
The REST API should analyse the text in the POST request and return any matched groups through sentiment analysis.

Upload multiple files/images using newman command in Jenkins

Running a Postman API using Newman command which currently uploads a single file. My requirement is to upload multiple files using this same API.
My current code which uploads a single file looks like this:-
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"description": "Jpeg image or video (mov or mp4)",
"type": "file",
"src": "C:\\Test\\abc.jpeg"
}
]
}
In this very same code, I want to upload multiple files.
Need some direction on how can I achieve it.
I post multi file in postman/newman by sending multi POST requests - one file per request.
So you can send many files executing one postman collection of requests.
Edit:
Example of form with 2 file field:
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "myFile1",
"description": "Jpeg image or video (mov or mp4)",
"type": "file",
"src": "C:\\Test\\abc.jpeg"
},
{
"key": "myFile2",
"description": "Jpeg image or video (mov or mp4)",
"type": "file",
"src": "C:\\Test\\def.jpeg"
}
]
}

Some of the APIs are not accessible of IBM cloud storage object S3 API

I am referring information on following url.
https://ibm-public-cos.github.io/crs-docs/about-compatibility-api#operations-on-buckets
As mentioned in above URL,there are 3 Objects related IBM cloud storage object API which are accessible.However,some APIs of IBM CSO API are not accessible e.g. PUT Bucket ACL & GET Bucket ACL and getting 403 error message while accessing them with POSTMAN.I need information that how can we access these APIs? Please provide any information related to it.
Any help is greatly appreciated.
As of today, GET/PUT Bucket ACL are supported in IBM COS. If you are using Postman, here's an example of a Postman dump for these (obviously you'll need to calculate the Authorization header and use all of your own info, this is just an educational sample):
{
"version": 1,
"collections": [
{
"id": "ab20b534-025a-4be2-b90f-a980d4a81632",
"name": "Operations on buckets",
"folders": [],
"requests": [
{
"id": "b89a66a4-0183-43cf-9712-7c07ba615b0b",
"url": "http://endpoint/bucket-name?acl=",
"method": "PUT",
"collectionId": "ab20b534-025a-4be2-b90f-a980d4a81632",
"name": "Add a bucket ACL (canned)",
"description": "",
"headers": "x-amz-date: {timestamp}\nAuthorization: {authorization-string}\nx-amz-acl: public-read\nContent-Type: text/plain",
"dataMode": "raw",
"data": ""
},
{
"id": "df2a9b2a-d66b-4ea6-8cfb-ab341ec23bc2",
"url": "http://endpoint/bucket-name?acl=",
"method": "PUT",
"collectionId": "ab20b534-025a-4be2-b90f-a980d4a81632",
"name": "Add a bucket ACL (custom)",
"description": "",
"headers": "x-amz-date: {timestamp}\nx-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\nAuthorization: {authorization-string}\nContent-Type: text/plain; charset=utf-8",
"dataMode": "raw",
"data": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<AccessControlPolicy xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">\n <Owner>\n <ID>d4d11b981e6e489486a945d640d41c4d</ID>\n <DisplayName>OwnerDisplayName1</DisplayName>\n </Owner>\n <AccessControlList>\n <Grant>\n <Grantee xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"CanonicalUser\">\n <ID>d4d11b981e6e489486a945d640d41c4d</ID>\n <DisplayName>some-name</DisplayName>\n </Grantee>\n <Permission>FULL_CONTROL</Permission>\n </Grant>\n <Grant>\n <Grantee xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"CanonicalUser\">\n <ID>a5c26620b0704967a72d7aeb90cf57b2</ID>\n <DisplayName>some-name</DisplayName>\n </Grantee>\n <Permission>WRITE</Permission>\n </Grant>\n </AccessControlList>\n</AccessControlPolicy>"
},
{
"id": "7f79523f-b9aa-46ad-abda-9ad7e37d3980",
"url": "http://bucket-name.endpoint/?acl=",
"method": "GET",
"collectionId": "ab20b534-025a-4be2-b90f-a980d4a81632",
"name": "Get a bucket ACL",
"description": "",
"headers": "x-amz-date: {timestamp}\nAuthorization: {authorization-string}\nContent-Type: text/plain",
"dataMode": "raw",
"data": ""
}
],
"order": [
"b89a66a4-0183-43cf-9712-7c07ba615b0b",
"df2a9b2a-d66b-4ea6-8cfb-ab341ec23bc2",
"7f79523f-b9aa-46ad-abda-9ad7e37d3980"
]
}
],
"environments": [
{
"id": "fa619322-0a84-47b5-958b-84fa4a6286ba",
"name": "API-Flow Imports",
"values": [],
"timestamp": 1497532748923
}
]
}
Based on your reference to the 'Cloud Storage Object API', I can guess you might be working with an on-premises installation of IBM COS. Please send me an email at nicholas.lange[at]ibm.com so we can discuss what you are looking for.