How to send a activity feed notification with a query on Teams? - notifications

I've been developing a Teams Custom App with the TeamsFx SDK. I want to send a activity feed notification with a query.
I tried the HTTP request as below, however the app wasn't able to recieve a query(hoge=123).
POST https://graph.microsoft.com/v1.0/users/{user id}/teamwork/sendActivityNotification
Content-Type: application/json
{
"topic": {
"source": "entityUrl",
"value": "https://graph.microsoft.com/v1.0/users/{user id}/teamwork/installedApps/{installation id}?hoge=123"
},
"activityType": "taskCreated",
"previewText": {
"content": "New Task Created"
},
"templateParameters": [
{
"name": "taskId",
"value": "Task 12322"
}
]
}
Is there any wat to send a activity feed notification with a query?

Related

Why is my whatsapp message not being sent?

Testing with Postman, I'm trying to send a message per the glitch example project from docs
I'm trying to write an API endpoint I can hit with a webhook when people send a message to my Org's whatsapp number. The API would send an automated response.
When I send the POST, with the following body to https://graph.facebook.com/v14.0/redacted/messages it comes back with the following response:
{
"error": {
"message": "(#131030) Recipient phone number not in allowed list",
"type": "OAuthException",
"code": 131030,
"error_data": {
"messaging_product": "whatsapp",
"details": "Recipient phone number not in allowed list: Add recipient phone number to recipient list and try again."
},
"error_subcode": 2655007,
"fbtrace_id": "A5YKQbpB0PEaaA-gIROEv-n"
}
}
The error code isn't list one the error codes page, nor can I find anything about adding a recipient phone number anyway (it doesn't make sense to require a pre-defined list of recipient phone numbers to which I can send messages).
Here's the message body:
{
"messaging_product": "whatsapp",
"to": "redacted",
"text": {
"body": "Ack: Hello world"
}
}
How do I get the message sent? I'm not able to proceed with development of my app until I can send a message.
Just Remove + from your mobile number and add you country code before your number.
Then its working fine.
Request Body:
{
"messaging_product": "whatsapp",
"to": "91xxxxxxxxxx",
"type": "template",
"template": {
"name": "hello_world",
"language": {
"code": "en_US"
}
}
}
Response Body:
{
"messaging_product": "whatsapp",
"contacts": [
{
"input": "91xxxxxxxxxx",
"wa_id": "91xxxxxxxxxx"
}
],
"messages": [
{
"id": "wamid.HBgMOTE3NTM4OTE4MzIyFQIAERgSOERCM0ZDOTJFMDk1RjBFNURBAA=="
}
]
}
for Your Reference
I got the same error code and message here.
I was debugging it and see that the from number is a little different than the number I had registered when I will echo the message back.
You can put the number of phone hard coded that you have registered before to see it working.

The request includes at least one invalid\/malformed connection photo id

I'm using Google StreetView Publish API to connect photos in a virtual tour and to some external photos on Google StreetView such as a road.
This is the API I use:
https://developers.google.com/streetview/publish/reference/rest/v1/photo/update
And this is the body of the request:
{
"pose": {
"heading": 26,
"latLngPair": {
"latitude": 47.707604844777,
"longitude": -124.41849471719
}
},
"places": [
{
"place_id": "ChIJvcvraDvfjVQR45a-VRk0lGs"
}
],
"connections": [
{
"target": {
"id": "CAoSLEFGMVFpcE5fWGtUZTFWV3dxRm9tOEFlRHVmYVdvTmdDR2NueVZ0dzhid0ZX"
}
},
{
"target": {
"id": "rQfq6hLfyFVfC0V43rrWDw"
}
}
],
"captureTime": {
"seconds": "1653027016"
}
}
But I'm getting this error message when I'm trying to add external panorama ID ({"target":{"id": "rQfq6hLfyFVfC0V43rrWDw"}} to the connections array.
{
"error": {
"code": 400,
"message": "The request includes at least one invalid\/malformed connection photo id.",
"status": "INVALID_ARGUMENT",
"details": [
{
"#type": "type.googleapis.com\/google.rpc.ErrorInfo",
"metadata": {
"EXTERNAL_MESSAGE": "The request includes at least one invalid\/malformed connection photo id."
}
}
]
}
}
Does Google let to connect your panoramas to the Google StreetViews panoramas such as street photos, etc? Or what I was doing wrong? Thank you in advance
You can not link your panoramas directly to Google Street View panoramas.
For a while, Google connected the tours automatically, if they were in a certain range. They stopped doing this and undid those connections, so at the moment both exist side by side on the same map.

Have a data message for Android and normal notification for IOS in single FCM request

Currently, I have different ways to handle notifications depending on if the system is Android or IOS, for Android, I send a data-only notification and create a local notification from it.
For IOS, since data-only notifications have no guarantee that they will be retrieved if the app is closed, I send a normal notification.
What I'm trying to do is having both notifications using the same FCM API call, here is my current json:
{
"data": {
"click_action": "FLUTTER_NOTIFICATION_CLICK",
"d": "my_data",
},
"apns": {
"headers": {
"apns-priority": "10"
},
"payload": {
"aps": {
"alert": {
"title": "my title",
"body": "my body"
}
}
}
},
"priority": "high",
"registration_ids": [...],
"time_to_live":86400
}
So, what I expected from this request is that for android it would create a data only notification using:
{
"data": {
"click_action": "FLUTTER_NOTIFICATION_CLICK",
"d": "my_data",
}
}
And for IOS, it would create a normal notification using:
{
"notification": {
"title": "my title",
"body": "my body",
}
}
This works for Android, but I don't receive this notification as a normal notification on IOS.. Shouldn't the apns payload be used for IOS in this case?

Appstoreconnect Api user update

I can’t understand how to create the http body of the Modify User Account api:
PATCH
https://api.appstoreconnect.apple.com/v1/users/{id}
In particular the:
[UserUpdateRequest.Data.Relationships.VisibleApps.Data]
What are the required id and type properties of Data object? Could somebody provide a code or postman example of a request ?
This is the url of the topic:
Appstoreconnect Api - Update User
The PATCH request should look like this:
PATCH /v1/users/XXX
{
"data": {
"type": "users",
"id": "XXX",
"attributes": {
"allAppsVisible": false
},
"relationships": {
"visibleApps": {
"data": [
{"type": "apps", "id": "AAA"},
{"type": "apps", "id": "BBB"}
]
}
}
}
}
Where AAA and BBB are Apple IDs of your apps. You can find these on the App Information page, or in response to the /v1/apps API calls.

Update Account (PUT) Endpoint in new Yodlee API for MFA

Background
I am using the newer Yodlee Aggregation API that differs from what I was previously building off of.
I am currently using this endpoint in the account registration flow to put the MFA response:
PUT /{cobrandName}/v1/providers/{providerAccountId}
My request looks like this:
{
url: `${this.rest}providers/${providerAccountId}`,
headers: {
'Authorization': `cobSession=${self.appToken}, userSession=${token}`
},
form: {
'MFAChallenge': JSON.stringify(newMfa)
}
}
where this.rest is my personal rest url, providerAccountId is the appropriate providerAccountId for the refresh, self.appToken is the current cobrand session token, token is the current user's login token, and newMfa is a JSON object being stringified that matches this profile:
{
"loginForm": {
"mfaTimeout": 94650,
"formType": "questionAndAnswer",
"row": [
{
"id": "SQandA--QUESTION_1--Row--1",
"fieldRowChoice": "0001",
"form": "0001",
"label": "What is the name of your state?",
"field": [
{
"id": "SQandA_QUESTION_1_1",
"name": "QUESTION_1",
"isOptional": false,
"value": "Enter the answer",
"valueEditable": true,
"type": "text"
}
]
},
{
"id": "SQandA--QUESTION_2--Row--2",
"fieldRowChoice": "0001",
"form": "0001",
"label": "What is the name of your first school",
"field": [
{
"id": "SQandA_QUESTION_2_2",
"name": "QUESTION_2",
"isOptional": false,
"value": "Enter the answer",
"valueEditable": true,
"type": "text"
}
]
}
]
}
with the exeption being the value fields of the field object, which have been encrypted with PKI as per instructions.
Issue
However, when I carry out this PUT request, I get this error from Yodlee:
{ errorCode: 'Y803',
errorMessage: 'MFAChallenge or providerParam required',
referenceCode: 'p1460412835654A4Q24t' }
though I clearly have an MFAChallenge parameter in my form. Any ideas on why I could be getting this error if the MFAChallenge is present (and note that it is the only info that is passed through the PUT request other than through headers or url parameters)? I tried putting it through as body data, but that doesn't seem to work, and very few of the API endpoints actually seem to use body over form encoded strings, though there was at least one.
You have to send this information MFAChallenge as part of URL, see below example
https://developer.api.yodlee.com/ysl/restserver/v1/providers/10114184?MFAChallenge=%7B%20%22loginForm%22%3A%20%7B%20%20%20%20%20%22mfaTimeout%22%3A%2094650%2C%20%20%20%20%20%22formType%22%3A%20%22questionAndAnswer%22%2C%20%20%20%20%20%22row%22%3A%20%5B%20%20%20%20%20%7B%20%20%20%20%20%20%20%20%20%22id%22%3A%20%22SQandA--QUESTION_1--Row--1%22%2C%20%20%20%20%20%20%20%20%20%22fieldRowChoice%22%3A%20%220001%22%2C%20%20%20%20%20%20%20%20%20%22form%22%3A%20%220001%22%2C%20%20%20%20%20%20%20%20%20%22label%22%3A%20%22What%20is%20the%20name%20of%20your%20state%3F%22%2C%20%20%20%20%20%20%20%20%20%22field%22%3A%20%5B%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22id%22%3A%20%22SQandA_QUESTION_1_1%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%22QUESTION_1%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22isOptional%22%3A%20false%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22Enter%20the%20answer%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22valueEditable%22%3A%20true%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22text%22%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20%20%20%20%20%20%20%20%20%5D%20%20%20%20%20%7D%2C%20%20%20%20%20%7B%20%20%20%20%20%20%20%20%20%22id%22%3A%20%22SQandA--QUESTION_2--Row--2%22%2C%20%20%20%20%20%20%20%20%20%22fieldRowChoice%22%3A%20%220001%22%2C%20%20%20%20%20%20%20%20%20%22form%22%3A%20%220001%22%2C%20%20%20%20%20%20%20%20%20%22label%22%3A%20%22What%20is%20the%20name%20of%20your%20first%20school%22%2C%20%20%20%20%20%20%20%20%20%22field%22%3A%20%5B%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22id%22%3A%20%22SQandA_QUESTION_2_2%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%22QUESTION_2%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22isOptional%22%3A%20false%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22Enter%20the%20answer%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22valueEditable%22%3A%20true%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22text%22%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20%20%20%20%20%20%20%20%20%5D%20%20%20%20%20%7D%20%5D%20%7D