Error: Failed to send Target is not set or not in URL format(Microsoft Teams) - office365connectors

"potentialAction": [
{
"#type": "HttpPOST",
"name": "Renew",
"targets": "url"
}
I am trying to do a HttpPost action thru connector cards in Microsoft Teams, But whenever I click the action button I get an error as "Failed to send Target is not set or not in URL format". Can Someone help me with this error?

You need to use "target" instead of "targets" for this. Please try with the following payload and it should work:
"potentialAction": [{
"#type": "HttpPOST",
"name": "Submit",
"target": "https:// ..."
}]

Related

Document AI Contract Processor with Human-In-The-Loop: Processor type not found for getting predefined fields for validation criteria: 48

The Human-in-the-Loop configuration Wizard for the "Contract Processor" in US region has failed while applying the configuration made from the Console, with the following error in the Console error logs.
{
"protoPayload": {
"#type": "type.googleapis.com/google.cloud.audit.AuditLog",
"status": {
"code": 5,
"message": "Processor type not found for getting predefined fields for validation criteria: 48"
},
"authenticationInfo": {
"principalEmail": "XXX"
},
"requestMetadata": {
"requestAttributes": {},
"destinationAttributes": {}
},
"serviceName": "documentai.googleapis.com",
"methodName": "google.cloud.documentai.uiv1beta3.DocumentProcessorService.UpdateHumanReviewConfig",
"resourceName": "projects/XXX/locations/us/processors/3e85a4841d13ce5/humanReviewConfig"
},
"insertId": "dlpi8nb10",
"resource": {
"type": "audited_resource",
"labels": {
"project_id": "aptsonicxx",
"service": "documentai.googleapis.com",
"method": "google.cloud.documentai.uiv1beta3.DocumentProcessorService.UpdateHumanReviewConfig"
}
},
"timestamp": "2023-01-16T18:31:21.160785363Z",
"severity": "ERROR",
"logName": "projects/XXX/logs/cloudaudit.googleapis.com%2Factivity",
"operation": {
"id": "projects/XXX/locations/us/operations/5578187298605838878",
"producer": "documentai.googleapis.com",
"last": true
},
"receiveTimestamp": "2023-01-16T18:31:22.140730942Z"
}
Since then, I am stuck, unable to modify or to amend the configuration. "Manage Configuration" leads to the threshold and results folder settings, with the confirmation button or cancel not having any effect.
Have I missed something?
As #HoltSkinner as mentioned, this is a confirmed bug/issue and has already been reported internally to the development team.
You may follow this Public Issue Tracker for this specific issue and click on +1 to bring more attention to the issue.
Posting the answer as community wiki for the benefit of the community that might encounter this use case in the future.
Feel free to edit this answer for additional information.

Callback url value in email for verifying account

This is an extension of Unable to validate account confirmation in WSO2 version 6.0 issue.
I have same regex pattern in my self-registration section. But when I'm creating users using rest API, the link which I got in the email is
https://localhost:9443/accountrecoveryendpoint/confirmregistration.do?confirmation=ce790759-1086-4870-a673-35b5927351d8&userstoredomain=PRIMARY&username=samyu&tenantdomain=carbon.super&callback={{callback}}
and when I created the user using manually the link which I got is
https://localhost:9443/accountrecoveryendpoint/confirmregistration.do?confirmation=dff024e7-d7e7-48ef-bb60-1c1c4d6f3b1c&userstoredomain=PRIMARY&username=sam&tenantdomain=carbon.super&callback=https%3A%2F%2Flocalhost%3A9443%2Fmyaccount.
So, the difference between these two links is that callback. So what configuration should I make in order to get the callback value
When you are trying this from the recovery portal, the callback value is set automatically. If you are trying with the REST API you need to include that in the request. The following is a sample JSON payload.
{
"user": {
"username": "kim",
"realm": "PRIMARY",
"password": "Password12!",
"claims": [
{
"uri": "http://wso2.org/claims/givenname",
"value": "kim"
},
{
"uri": "http://wso2.org/claims/emailaddress",
"value": "kimAndie#gmail.com"
},
{
"uri": "http://wso2.org/claims/lastname",
"value": "Anderson"
},
{
"uri": "http://wso2.org/claims/mobile",
"value": "+947729465558"
}
]
},
"properties": [
{
"key": "callback",
"value": "https://localhost:9443/myaccount"
}
]
}
Notice the way how you need to send the callback when using the REST API.

multipart boundary not found - aws api gateway

I have created AWS API-Gateway and I am trying to upload an image using Postman but I received an error of Multipart: boundary not found.
I have tried below solution for this issue whereas I created model for API as follows:
Model name: fileupload
Content type: image/png
Model schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "UserAccountUpdate",
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"avatar": { "type": "string" },
"username": { "type": "string" }
}
}
}
}
But, this didn't worked.
I expect my image to get uploaded but it receives an error of Multipart: boundary not found.. Please Help me to resolve this issue, Thanks.
Go to the API Gateway settings tab for your API and add "multipart/form-data" to the "binary media types" section:
You have to use HTTP Proxy integration and for Content Handling , choose Passthrough.

Test Slack team_join event with Postman

I've followed this Slack tutorial to create an onboarding bot that gives people a few tips on how to interaction with other members. The tutorial recommends using Postman to test onboard experience, but it's not clear on how. I'm getting stuck on this: where do I put the a authorization token?
Prereqs:
ngrok is running on port 9292
rackup was run to start the server
I followed all steps to configure the Slack app as shown in the tutorial
I clicked the Slack button to authorize the application
What I'm doing:
Using Postman macOS client to send this default JSON event for team_join to the /events endpoint:
{
"type": "team_join",
"user": {
"id": "U023BECGF",
"name": "bobby",
"deleted": false,
"color": "9f69e7",
"profile": {
"first_name": "Bobby",
"last_name": "Tables",
"real_name": "Bobby Tables",
"email": "bobby#slack.com"
},
"is_admin": true,
"is_owner": true,
"is_primary_owner": true,
"is_restricted": false,
"is_ultra_restricted": false,
"has_2fa": false,
"two_factor_type": "sms"
}
}
I've tried including token as a parameter, header key/value and within the JSON object. None of these approaches seems to do it and it results in an authorization error. I get Invalid Slack verification token received: or a parsing issue.
How does one test something like a new user joining using this setup?
The token is available within the Event envelope, so you'll need to go up one level in the JSON:
{
"token": "{{verification_token}}",
"team_id": "{{team_id}}",
"api_app_id": "{{app_id}}",
"event": {
"type": "team_join",
"user": {
"id": "{{user_id}}",
"team_id": "{{team_id}}",
"name": "{{user_name}}",
"deleted": false,
"status": null,
"real_name": "{{user_real_name}}",
"profile": {
"first_name": "{{user_first_name}}",
"last_name": "{{user_last_name}}",
"real_name": "{{user_real_name}}",
"real_name_normalized": "{{user_real_name}}"
},
"is_bot": false
}
},
"type": "event_callback",
"authed_users": ["{{authed_user}}"]
}

Delete record Libcloud (GoDaddy api)

I try to implement delete method for Record delate-record, but its my first time to use python and this api.
The GoDaddy API doesn't have a delete record method, so this functionality is not exposed in the driver.
https://developer.godaddy.com/doc#!/_v1_domains/recordReplace
The driver could offer the 'replace records in zone' method, which would allow you to fetch the current list of records, and then set the new list minus the record you want to remove. But that feature is not implemented and quite risky.
First,
Send a GET request to https://api.godaddy.com/v1/domains/{DOMAIN}/records
Then, Enumerate over all records of API Response (JSON Array) and prepare new data by removing the one that needs to be deleted.
API Response (SAMPLE)
[
{
"data": "192.168.1.1",
"name": "#",
"ttl": 600,
"type": "A"
},
{
"data": "ns1.example.com",
"name": "#",
"ttl": 3600,
"type": "NS"
},
{
"data": "#",
"name": "www",
"ttl": 3600,
"type": "CNAME"
},
{
"data": "mail.example.com",
"name": "#",
"ttl": 3600,
"priority": 1,
"type": "MX"
}
]
New Data (After deleting record) (SAMPLE)
[
{
"data": "192.168.1.1",
"name": "#",
"ttl": 600,
"type": "A"
},
{
"data": "ns1.example.com",
"name": "#",
"ttl": 3600,
"type": "NS"
},
{
"data": "#",
"name": "www",
"ttl": 3600,
"type": "CNAME"
}
]
Now,
Send a PUT request to https://api.godaddy.com/v1/domains/{DOMAIN}/records with new data.
The most important thing is how you identify the records in above array which needs to be deleted. This would not be a difficult task, assuming you have good programming skills.
I managed to worked around it in kind of a hacky - we had bunch of records we wanted to delete, doing it manually seemed weird so I added a Javascript into the Chrome Developer Console, running on an authenticated session from the DNS manage page:
function deleteGoDaddyRecords(recordId) {
$.ajax({
url: 'https://dcc.godaddy.com/api/v3/domains/<YOUR-DOMAIN.com>/records?recordId='+recordId,
type: 'DELETE',
success: function(result) {
console.log(result)
}
});
}
which let me use the same call the UI is calling when you ask to delete a record.
the only thing you need to provide is the AttributeUid which is not available with the public API, but it is in the front-end API:
https://dcc.godaddy.com/api/v2/domains/runahr.com/records
So I managed to create a script that will generate bunch of
deleteGoDaddyRecords('<RECORD-UUID>');
deleteGoDaddyRecords('<RECORD-UUID>');
copy & paste the generated script into the Developers Console and that solved it for now.
I hope GoDaddy will add a public DELETE endpoint to their API in the future :)