I am trying to send an SMS using AWS SNS through the CLI using the following command
aws sns publish --phone-number +918XXXXXXXX3 --message foo
I get a message-id as a response like the following
{
"MessageId": "7b80cabd-70ca-56b1-8dba-9d3ab28e5d5d"
}
After some time when I check cloud watch logs for SNS I get the below-mentioned error
{
"notification": {
"messageId": "7b80cabd-70ca-56b1-8dba-9d3ab28e5d5d",
"timestamp": "2020-07-14 12:40:48.181"
},
"delivery": {
"destination": "+918XXXXXXXX3",
"smsType": "Transactional",
"providerResponse": "Internal Error",
"dwellTimeMs": 70
},
"status": "FAILURE"
}
I had raised a support request for this issue with AWS and they have responded. Here is the complete response.
Related
I wrote google translator. Please understand this part.
hi.
There was a problem when upgrading the API version from FCM HTTP to FCM HTTP v1.
FCM HTTP v1 API request was made through POSTMAN.
Below is the sending message body.
{
"message": {
"topic": "this_is_test_topic",
"data": {
"body": "1234567890"
},
"android": {
"priority": "high"
}
}
}
When I made the above request, IOS client received it normally even though it was sent once or twice per second.
However, the ANDROID client did not receive a message from FCM for a certain period of time after receiving the first 20 times.
The message could be transmitted once more after a certain time.
This was the same as the limitations of compact messages in the FCM documentation.
Link: https://firebase.google.com/docs/cloud-messaging/concept-options?hl=en#collapsible_throttling
However, I didn't put any data related to the miniature in the message I sent.
If you make a request to the existing FCM HTTP with the same topic, data is received normally. Below is the corresponding code.
{
"to": "this_is_test_topic",
"data": {
"body": "1234567890"
}
}
If the FCM HTTP v1 API is requested using the same topic and token instead of topic, data is received normally. Below is the corresponding code.
{
"message": {
"token": "asdkjasldjalksdjlk*******************",
"data": {
"body": "1234567890"
},
"android": {
"priority": "high"
}
}
}
all request response status code is 200
Am trying to call google calendar's push notification apis. I have written a google cloud function which just returns a response containing request body and headers. I want to use this google cloud function url as the receiving url for the push notification. The google docs mention steps to verify and register the domains, as part of which it asks me to upload a binary. Not sure how do upload a binary against this cloud function domain. My domain looks like https://asia-northeast1-project-name.cloudfunctions.net
This was my request for registering push notification:
Request:
POST
https://www.googleapis.com/calendar/v3/calendars/primary/events/watch?key={YOUR_API_KEY}
{ "id": "404713b9-d880-437d-b890-83715f01af7c", "type": "web_hook",
"address":
"https://asia-northeast1-huddle-quick-solutions.cloudfunctions.net/suratCalendarNotifications" }
Response:
{ "error": { "errors": [ {
"domain": "global",
"reason": "push.webhookUrlUnauthorized",
"message": "Unauthorized WebHook callback channel: https://asia-northeast1-project-name.cloudfunctions.net/path" } ], "code": 401, "message": "Unauthorized WebHook callback
channel:
https://asia-northeast1-project-name.net/path"
} }
I'm trying to send a notification using firebase api and the notification is sent successfully if I only have "title" and "body" in the notification JSON object. However, if I add "sound":"default" to the notification object, as described in the documentation, I get the following error:
"Invalid JSON payload received. Unknown name \"sound\" at 'message.notification': Cannot find field."
My JSON object is as follows:
{"message":{"token": token, "notification":{"title":"Test", "body":"Test message from server", "sound":"default"}}}
The appearance of message in your JSON indicates you are using the HTTP v1 API. The documentation you linked is for the legacy API.
The HTTP v1 API JSON to send a notification with sound for Android and iOS devices should be:
{
"message": {
"token": "your-token-value",
"notification": {
"title": "Test",
"body": "Test message from server"
},
"android": {
"notification": {
"sound": "default"
}
},
"apns": {
"payload": {
"aps": {
"sound": "default"
}
}
}
}
}
I'm referring to use Openstack API to get quota usage from Openstack Cloud. I did exactly as document at https://developer.openstack.org/api-ref/compute/.
But It didn't work, with api:
<host>/v2/{tenant_id}/os-quota-sets/{tenant_id}/detail
or
<host>/v2/{tenant_id}/os-quota-sets/detail
It worked with api:
<host>/v2/{tenant_id}/os-quota-sets/{tenant_id}
But, I want to get details. Did I do anything wrong?
OpenStack client can be used... And you can use command line tools.... Below is the link which can help you.
https://docs.openstack.org/nova/pike/admin/quotas.html
You can install OpenStack SDK, you can go through API documentation section for networking.
Below is the link:
https://docs.openstack.org/openstacksdk/latest/user/proxies/network.html#openstack.network.v2._proxy.Proxy.update_quota
You may find methods like:
delete_quota(quota, ignore_missing=True)
get_quota(quota, details=False)
API for getting project quota can be called as,
requests.get('http://'+url+':8774/v2.1/os-quota-sets/'+projectid+'/detail',headers={'content-type': 'application/json', 'X-Auth-Token': token})
You will have to pass your project id in path and 'X-Auth-Token' parameter in headers which can be extracted as,
url = [Your Cloud Machine IP Goes here]
def gettokenForUser(username,password):
payload1 = {
"auth": {
"identity": {
"methods": [
"password"
],
"password": {
"user": {
"name": username,
"domain": {
"name": "Default"
},
"password": password
}
}
}
}
}
response = requests.post('http://'+url+':5000/v3/auth/tokens',
headers={'content-type': 'application/json'},
data=json.dumps(payload1))
return response.headers['X-Subject-Token']
I am trying to use the Bulk Send Message API in IBM MobileFirst Platform Foundation 7.0. Unfortunately, the example JSON from the docs does not work and gets an error about the object structure being sent.
This is the JSON Object I'm sending:
{
"//ArrayOfMessageBody": [
{
"messages": {
"alert": "Test message"
},
"settings": {
"apns": {
"actionKey": "Ok"
}
},
"target": {
"consumerIds": [
"MyConsumerId1"
],
"deviceIds": [
"MyDeviceId1"
],
"platforms": [
"A"
]
}
}
]
}
And Here is the server's response error:
com.ibm.json.java.JSONObject cannot be cast to com.ibm.json.java.JSONArray
I am having success sending to devices via the single Send Message API, so I know messaging works. However, Bulk Send Message is failing.
It turns out that the documentation was what hung me up. If you send an array of messages to the bulk send message endpoint it will work.
[{message1}, {message2}, ...]
I'm still not sure what the whole //ArrayOfMessageBody thing is.