Deleting Microsoft graph fails with ExtensionError - graph

I am trying to delete a webhook subscription to Microsoft graph.
My http call is:
DELETE https://graph.microsoft.com/v1.0/subscriptions/3ecdf72f-f302-49f6-851c-d04d178a9ref
I got the id of the subscription using:
GET https://graph.microsoft.com/v1.0/subscriptions
As response I am getting this error:
{
"error": {
"code": "ExtensionError",
"message": "Operation: Delete; Exception: [Status Code: NotFound; Reason: Not Found]",
"innerError": {"request-id": "2c61eba9-86c8-4420-9276-d6581fd3c5b7", "date": "2018-10-30T15:11:57"}
}
}

We are investigating a bug where sometimes subscriptions will be orphaned in the system. The actual subscription was originally removed and notifications are not being sent.
You should expect the subscription to be removed properly from the system in the next few days, as we fix the bug. Sorry for any inconvenience.

Related

How to get other member's profile details from linkedin api

I am trying to fetch users details from linkedIn api. After generating accesstoken I can get my details from linkedIn api but I want to get other members details. How to get this work? please help me.
I have tried the solutions according to the documentation.
As per the documentation we have to sent a get request to the GET https://api.linkedin.com/rest/people/(id:{person ID}) to Retrieve Other Member's Profile. When I am sending the get request it is showing me
data: {
code: 'VERSION_MISSING',
message: 'A version must be present. Please specify a version by adding the LinkedIn-Version header.'
}
this error. after searching the documentation I found that there is a note saying
in order to make the sample calls above succeed, you must include
X-RestLi-Protocol-Version:2.0.0 in your request header.
I have added that to and still getting the error.
I experienced the same issue. After some browsing this works for me:
Use https://api.linkedin.com/v2/me instead of https://api.linkedin.com/rest/me
You need to pass the version number like this: LinkedIn-Version: 202210. It worked for me without changing /rest to /v2. More info here: Introducing API Versioning and New Content APIs.
I had the same problem.
As the error says, I tried using LinkedIn-Version as the header key and got:
{
"code": "INVALID_VERSION",
"message": "API versions should have date format as YYYYMM or YYYYMM.RR where RR is the revision"
}
With the header value being: 2.0.0
So I tried sending as value: 202201.01 ==> YYYY=2022, MM=01, RR=01
YYYY: year
MM: month
RR: revision
Obtaining:
{
"code": "NONEXISTENT_VERSION",
"message": "Requested version 20220101 is not active"
}
Trying some different dates and revision codes, I got to value = 202204.01 that gave me:
{
"serviceErrorCode": 100,
"code": "ACCESS_DENIED",
"message": "Not enough permissions to access: me.GET.20220401"
}
I'm also facing the same issue but you can use this
https://api.linkedin.com/v2/me
and it will work
This version worked for me: 202204.01
Then I got:
"code": "EMPTY_ACCESS_TOKEN",
"message": "Empty oauth2 access token"
Which I think can be fixed by getting the access token by implementing the 3-legged OAuth. I have successfully implemented that for getting someone's profile but I am doing this for getting org info

CreateFileUploadSession() calls result in "Object reference not set to an instance of an object." response from Graph API

I have a website running in production that uploads files on behalf of users. This functionality has been working for months with only transient network issues.
Past two weekdays (Friday and Monday, virtually no usage over the weekend), all users are getting the standard null reference error whenever they try to upload the file. I'm able to produce this in all our environments. The interesting part is that the graph service itself is returning the error message, this is NOT a null reference exception from the website code.
Here is the request URL:
https://graph.microsoft.com:443/beta/groups/[id]/drive/items/[folderId]:/[filename].[ext]:/microsoft.graph.createUploadSession
The [] and content within are placeholders for the values that are sent. I am using the .NET Graph SDK and have verified that it is properly encoding the file name.
The body of the response from the Graph API is:
{
"error": {
"code": "InternalServerError",
"message": "Object reference not set to an instance of an object.",
"innerError": {
"request-id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"date": "2020-02-17T20:10:03"
}
}
}

Firebase Cloud Messaging tokens stop working - 404 NOT FOUND

We have a problem where Firebase Cloud Messaging tokens seem to have stopped working. We register with Firebase when the application first starts-up and then we call an API to store the token on our server.
We upgraded the app last night and checked that a sample of devices successfully registered themselves and that we could send messages.
Today, however, some calls to Firebase from our server are returning:
{
"error": {
"code": 404,
"message": "Requested entity was not found.",
"status": "NOT_FOUND",
"details": [
{
"#type": "type.googleapis.com/google.firebase.fcm.v1.FcmError",
"errorCode": "UNREGISTERED"
}
]
}
}
These calls are using the same tokens as last night. Half are working and half not.
We don't have any code that explicitly unregisters our app. What else might have caused this issue?
The app is written in C#/Xamarin and we're using CrossGeek's plugin for Firebase.
Thanks,
J.

FCM messaging responding with 503 consistently

I recently implemented FCM messaging as a means to perform push notifications to a Cordova based application. My system sends 100-1000 push notifications a day to individual users.
I'm contacting the FCM Messaging service using the FcmSharp library. https://github.com/bytefish/FcmSharp which as far as i can tell is using the FCM HTTP v1 API.
$"https://fcm.googleapis.com/v1/projects/{settings.Project}/messages:send"
So far it seem to be running ok. Yet i am continuously getting errors logged from the service that sends the messages to FCM indicating that there was a failure.
"error": {
"code": 503,
"message": "The service is currently unavailable.",
"errors": [
{
"message": "The service is currently unavailable.",
"domain": "global",
"reason": "backendError"
}
],
"status": "UNAVAILABLE"
}
The message i am sending (to FCMSharp) also appears to be formatted correctly:
message: {
"validate_only":false,
"message":{
"data":null,
"notification":{
"title":"[MyTitle]",
"body":"[MyBody]"
},
"android":{
"collapse_key":null,
"priority":"HIGH",
"ttl":"0s",
"restricted_package_name":null,
"data":null,
"notification":{
"title":null,
"body":null,
"icon":null,
"color":null,
"sound":"default",
"tag":null,
"click_action":null,
"body_loc_key":null,
"body_loc_args":null,
"title_loc_key":null,
"title_loc_args":null
}
},
"webpush":null,
"apns":{
"headers":null,
"payload":{
"aps":{
"alert":null,
"badge":0,
"sound":"default",
"content-available":0,
"mutable-content":0,
"category":null,
"thread-id":null
}
}
},
"token":"MyValidToken",
"topic":null,
"condition":null
}
As far as i can tell the service is not using the 'staging' environment mentioned in the post below.
FCM service unavailable nack
I am getting hundreds of these UNAVAILABLE answers a day, sometimes for hours on end. Messages are still getting through so i'm not sure i'm getting blacklisted. I don't see anything in their documentation to state if i'm using the wrong URL or hitting some sort of throttling limit.
This was because the FcmSharp service didn't implement the undocumented exponential back-off feature that is required by some Google Apis.
See the GitHub thread for more info.
https://github.com/bytefish/FcmSharp/issues/31

Actions on Google responds with "Sorry, I didn't get any response."

I am following this code lab Facts about You: Build a conversational app for the Google Assistant
I had it working once but must have done something wrong because now all. To be 100% clear i have deleted everything on my pc downloaded the code from Git again deleted the project in actions console deleted the project in api.ai. This is the result of a completely new install. I have not changed anything in the code lab.
"Sorry, I didn't get any response."
The request apears to be sending corectly
From actions test:
{
"conversationToken": "CiZDIzU5Ym...",
"debugLevel": 1,
"inputType": "KEYBOARD",
"locale": "en-US",
"mockLocation": {
"city": "Mountain View",
"coordinates": {
"latitude": 37.421980615353675,
"longitude": -122.08419799804688
},
"formattedAddress": "Googleplex, Mountain View, CA 94043, United States",
"zipCode": "94043"
},
"query": "tell me about cats",
"surface": "GOOGLE_HOME"
}
Received in fire-base
[{"name":"actions.capability.AUDIO_OUTPUT"}]},"inputs":[{"rawInputs":[{"query":"tell me about cats","inputType":"VOICE"}],"arguments":[{"rawText":"tell me about cats","textValue":"tell me about cats","name":"text"}],"intent":"actions.intent.TEXT"}],"user":{"locale":"en-US","userId":"AETml1RzwqyijfbawqjZkRSXz-P1"},"device":{},"conversation":{"conversationId":"1504878811393","type":"ACTIVE","conversationToken":"[\"_actions_on_google_\",\"choose_fact-followup\"]"}}},"id":"3b97e239-346f-49a2-a106-96cfb6f69e92","timestamp":"2017-09-08T13:58:29.99Z","lang":"en","result":{"source":"agent","resolvedQuery":"tell me about cats","speech":"","action":"tell.cat.fact","actionIncomplete":false,"parameters":{},"contexts":[{"name":"_actions_on_google_","parameters":{"category.original":"headquarters","category":"headquarters","facts":{"content":{"headquarters":["Google has over 10 fitness facilities in its main campus."],"history":["Google was founded in 1998.","Google was founded by Larry Page and Sergey Brin.","Google went public in 2004.","Google has more than 70 offices in more than 40 countries."]}}},"lifespan":98},{"name":"actions_capability_audio_output","parameters":{},"lifespan":0},{"name":"google_assistant_input_type_voice","parameters":{},"lifespan":0},{"name":"choose_cats-followup","parameters":{},"lifespan":2}],"metadata":{"intentId":"14df3938-3776-477c-811c-d1758ecd15cb","webhookUsed":"true","webhookForSlotFillingUsed":"false","nluResponseTime":19,"intentName":"choose_cats"},"fulfillment":{"speech":"","messages":[{"type":0,"speech":""}]},"score":1},"status":{"code":200,"errorType":"success"},"sessionId":"1504878811393"}
Response returned to actions
{
"audioResponse": "//NExAARAA...",
"conversationToken": "CiZDIzU5Ym...",
"expectUserResponse": true,
"response": "Sorry, I didn't get any response.",
"visualResponse": {
"visualElements": []
}
}
I must be missing something. Firebase is receiving the request its just not responding correctly.
training image
That error on appears if your web hook doesn't provide a response to the assistant. The cloud function has been triggered or has timed out and not returned the JSON back to assistant to parse. Check to see what the output of the cloud function is and check it against the API.AI web hook format here https://developers.google.com/actions/reference/v1/apiai-webhook
It should look something like this:
{
"speech": "...", // ASCII characters only
"displayText": "...",
"data": {
"google": {
"expect_user_response": true,
"is_ssml": true,
"permissions_request": {
"opt_context": "...",
"permissions": [
"NAME",
"DEVICE_COARSE_LOCATION",
"DEVICE_PRECISE_LOCATION"
]
}
}
},
"contextOut": [...],
}
I think this is something on the Google's end. My application have been running on production for more than a week. Based on the logs everything was fine till 6 hours ago but since that the users don't get any answer back.
If I request on the API.AI the response is okay so it's not the firebase/fullfillment causing the issue.
Checked other applications some had the same problem some had no problem at all. Not sure what we can do here.
Errors like this are usually caused by a syntax error or other problem in your Firebase Function after you've updated it. There are a few good approaches to diagnosing problems like this:
Check the Firebase function log. If there is an error, it will almost certainly show up here.
From the command line you can use firebase functions:log to see the most recent logging messages. You can also use the console to view the logs by going to console.firebase.com, selecting the project, selecting Functions, and then the Logs tab.
If there isn't an error, it becomes more of a logic problem. Adding your own logs via console.log(), console.info(), or console.error()
Many times the logs will indicate the function is timing out after 60 seconds when you think you're returning things by then. Make sure you are completing any callbacks and calling assistant.ask() or assistant.tell() (or one of their cousins) to make sure they're being called.
After posting a question on the Google+ actions group. I got a response back from Google.
Actions Bug There is currently a bug in the Actions Platform that
might result in unexpected error messages when running your apps.
We are currently testing a fix and hope to have that rolled out soon.
As of 10 minutes ago it is working again. The code was correct all along.

Resources