GetStream RestApi error => Errors for fields 'actor', 'verb', 'object' - getstream-io

I am trying to send a post request to getstream using postman. I am not able to do that. I am getting the following error:-
{
"detail": "Errors for fields 'actor', 'verb', 'object'",
"status_code": 400,
"code": 4,
"exception": "InputException",
"exception_fields": {
"actor": [
"actor is a required field"
],
"object": [
"object is a required field"
],
"verb": [
"verb is a required field"
]
},
"duration": "0.21ms"
}
I am unable to solve the problem. I didn't find any documentation for sending post request. Maybe that's because I am beginner too. Anyway can anyone tell me how I can send a post request to getstream api using postman ????
Thanks!

Related

Resolving SystemForCrossDomainIdentityManagementBadResponse

I have implemented this SCIM reference code in our application.
My implemented code did pass all the test collection of Users present in this postman link. My SCIM Api was also accepted by Azure as the valid endpoint for Users.
The real problem starts when I tried to perform Provision on Demand from the Azure portal for a User.
I received the following error code: SystemForCrossDomainIdentityManagementBadResponse
Error Message: A required attribute is missing from a response. The missing attribute is Identifier. Here is the response:
{
"result": {
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {},
"active": true,
"displayName": "Chris Brown",
"emails": [
{
"type": "work",
"primary": true,
"value": "chris.brown#xyz.com"
}
],
"meta": {
"resourceType": "User",
"created": "2022-04-21T05:27:03.774148Z",
"lastModified": "2022-04-21T05:27:03.774148Z",
"version": null,
"location": null
},
"name": {
"formatted": "Chris Brown",
"familyName": "Brown",
"givenName": "Chris"
},
"preferredLanguage": "en-GB",
"userName": "chris.brown#xyz.com",
"externalId": "chris.brown",
"id": "a99b4da2-ab2f-49fc-8a01-4a9ce251fbdb",
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User",
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
]
},
"targetUrl": null,
"success": true,
"error": null,
"unAuthorizedRequest": false,
}
As you can clearly see, I have added id (the Identifier) to the response. Now I am confused about what the error message conveys.
Please help.
An image for clear understanding of the error message at Azure Portal:
Your response doesn't align with the SCIM spec. The response to the POST (I think that's what it is, given the screenshot) is nesting the actual response inside of a "Result" object that is not defined in the spec at all.
Take a look at https://datatracker.ietf.org/doc/html/rfc7644#section-3.3 for an example of a correct response to a POST.
Also, there are a number of attributes in your response, outside of the "request" attribute/object, that aren't defined in the spec and are therefore noncompliant. Those would be:
"targetUrl": null,
"success": true,
"error": null,
"unAuthorizedRequest": false,

Webhooks for Pages

My app doesn't have the 'pages_manage_metadata' permission yet.
So I use Graph API Explorer to Subscribe my app Webhook for a Facebook Page.
*[GET] me/subscribed_apps
return
"data": [
{
"category": "Business",
"link": "{https://}",
"name": "{App Name}",
"id": "{App Id}",
"subscribed_fields": [
"messages",
"feed",
"mention"
]
}
]
}
When I comment on a page's post, I just get notified with data returned: {}.
The same goes for when I use the 'Feed Test' in the 'Webhooks / Page' menu of the App.
How can I get this data?

Gocardless - Redirect flow in Node JS

I'm trying to use Gocardless to enable SEPA payment in my website.
The example in the API doc doesn't work and seems uncomplete
POST https://api.gocardless.com/redirect_flows HTTP/1.1
{
"redirect_flows": {
"description": "Wine boxes",
"session_token": "SESS_wSs0uGYMISxzqOBq",
"success_redirect_url": "https://example.com/pay/confirm",
"prefilled_customer": {
"given_name": "Frank",
"family_name": "Osborne",
"email": "frank.osborne#acmeplc.com"
}
}
}
That's the response I get :
{
"error": {
"message": "not found",
"errors": [
{
"reason": "not_found",
"message": "not found"
}
],
"documentation_url": "https://developer.gocardless.com/api-reference#not_found",
"type": "invalid_api_usage",
"request_id": "7ae43821-345d-4ffd-98d6-15c4fe5513e6",
"code": 404
}
}
How can it work if the access token of the application is never asked for the request ?

How to get Image sent by user in facebook messenger through api.ai?

Anyone know how to retrieve an image sent by user, via api.ai? Do I just access the original body request? How do I do that when it does not seem to be sending to api.ai? Do I just use my server to respond?
API.AI includes information on the original request made to API.AI from the 1-click integrations in the originalRequest JSON attribute sent with every API.AI webhook request. The format for a Facebook Messenger Rich Messaging message sent with an images has the form:
{
"originalRequest": {
"source": "facebook",
"data": {
"sender": {
"id": "<PSID>"
},
"recipient": {
"id": "<PAGE_ID>"
},
"timestamp": 1458692752478,
"message": {
"mid": "mid.145869661...",
"attachments": [
{
"type": "image",
"payload": {
"url": "<IMAGE_URL>"
}
}
]
}
}
}
}
Gist of full code example here
You can use the originalRequest.data.message.attachments[0].payload.url attribute to get the URL of the image.

Gmail API: Cannot create filters via Google APIs Explorer

I am trying to create filters via the Gmail API
Services > Gmail API v1 > gmail.users.settings.filters.create
Listing and lookup of single filters are working but I am not able to create new filters.
Request
POST https://www.googleapis.com/gmail/v1/users/me/settings/filters?key={YOUR_API_KEY}
{
"criteria": {
"query": "test"
},
"action": {
"addLabelIds": [
"Label_582"
]
}
}
Response
500
- Show headers -
{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendError",
"message": "Backend Error"
}
],
"code": 500,
"message": "Backend Error"
}
}
"Label_582" is valid.
Any ideas?
Thanks and best regards

Resources