Microsoft Graph API Subscriptions endpoint provides #odata.nextLink that gives a 404 - microsoft-graph-api

I'm currently experiencing an issue with the subscriptions endpoint.
When making a call to https://graph.microsoft.com/v1.0/subscriptions, a next link is returned.
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#subscriptions",
"#odata.nextLink": "https://graph.microsoft.com/v1.0/subscriptions?$skiptoken=NPt3S7g2KIxJBA0KWwQetRhFtPT2ht6ZVYoisBCCtvlN2050CZg8WeNGnmaMqUn.....",
"value": [
...
...
When following this next link, most of the time, more results and another nextLink should be provided until all the data has been returned.
However for the last two days we have been experiencing issues where following this link has led to the final link giving a 404 response and some html with the following body.
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>404 - File or directory not found.</h2>
<h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
</fieldset></div>
</div>
</body>
Is this a known issue with the service, or is there a process that should be being followed differently here?
I have been able to replicate this in Postman as well as impacting the java sdk here.
Thank you for your help.

As of 2021-10-13, this issue is no longer occurring and the Graph API is once again functioning as expected.

Related

ScriptApp.getService().getUrl() doesn't return the correct url. Returns /dev instead of /exec

I have started to get a weird bug with Google Apps Script. ScriptApp.getService().getUrl() doesn't return the current url, but I am confident that a month ago when I created the project it worked perfectly.
In a page served by GAP, I have a header like so:
<nav>
<div class="nav-wrapper teal lighten-1">
Project Database
<ul class="left hide-on-med-and-down">
<li class="active">Search</li>
<li>Add Entry</li>
</ul>
</div>
</nav>
When I go to the app through the link https://script.google.com/a/GSUITENAME/macros/s/ID/exec it works but when I click on the links in the header I get redirected like so https://script.google.com/macros/u/2/s/ID/dev?vue=create
So first of all I get redirected to a dev url and the "/a/GSUITENAME/" is lost. Since this URL is wrong i get a "Page not found" error
I hope someone can give me some pointers on what is going on, because according to the documentation I should get the proper url: https://developers.google.com/apps-script/reference/script/script-app#getService()
EDIT: When I test the project with the dev link it works as intended.
EDIT2: I did as TheMaster suggested and logout of all other google accounts except the one for that project. This time I get a functional url https://script.google.com/macros/s/ID/dev?vue=create but I still go from exec to dev which is not the desired behaviour.

Twilio call routing/management for small customer service team

I am trying to create a phone system with Twilio Javascript client SDK for a small customer service team with the following criteria:
each Client can see if multiple calls are coming in at the same time and choose which one to answer
each Client can transfer a call to another Client
From what I can tell there is no way to see multiple incoming calls
Which means, when transferring a call, if the phone is also ringing at the same time, the Client who is to be receiving the transferred call cannot see/accept the incoming call.
We have a small team (between 2-4 Clients online at any one time) working from the same office. It seems like TaskRouter is the only viable option but feels like overkill considering the size of our team and the simplicity of the problem I am trying to solve.
Any help would be much appreciated.
Twilio developer evangelist here.
This is what TaskRouter was designed for, though I understand that it may be overkill for the size of the team.
You could place all incoming calls into a queue using <Enqueue> (without a workflow ID) and then query the Queue resource to display all the current incoming calls. Then when you choose to answer or redirect the call, you can eject it from the queue using the REST API too, then directing it on to <Dial> the <Client> of choice.
Let me know if that points you in the right direction.
I thought I'd answer my own question as I have solved this problem for myself.
Nowhere in any of the docs or stack overflow questions I read did I see any mention that handling multiple incoming calls is possible within the browser with the JavaScript SDK. However, I have been able to do so. It seems that each Twilio.Device() can have multiple Connections. So by creating a new phone container as outlined bellow, you can manage each separately.
HTML
<div id="main_container">
<div class="phone_container" call_sid="">
<div class="well well-sm call-status">
Connecting to Twilio...
</div>
<div class="phone_btn_container">
<button class="btn btn-md btn-success answer-button" disabled>Answer</button>
<button class="btn btn-md btn-danger hangup-button" disabled>End</button>
<button class="btn btn-md btn-default mute-button" disabled>Mute</button>
</div>
</div>
</div>
Javascript
device.on('incoming', function(connection) {
// get call sid
var call_sid = connection.parameters.CallSid
// get phone container which holds the buttons and call status etc.
var phone_container = $('.phone_container')
// if there is only one container and it's empty, use this to handle call
if (phone_container.length == 1 && phone_container.attr('call_sid') == '') {
// set call sid to container
$('.phone_container').attr('call_sid', call_sid)
}
// else clone phone container for new call
else {
// clone , set call sid and append to main container
$('.phone_container').first().clone().attr('call_sid', call_sid).appendTo($('#main_container'))
}
});
In regards to transferring calls, I have used conference rooms to manage this. Similar to Devin Rader's answer to this question: Twilio - How to move an existing call to a conference

How to fix Meteor being unreliable on mobile

I'm not even sure where to start. I have a relatively simple meteor app (http://www.vertexshaderart.com). It's using iron router for routes. The main route / seems like a pretty normal situation. Show the 8 newest posts. Show the 8 most liked posts sort: {likes: -1}.
When I try to view on my phone it only works about 1 out 5 times, maybe less. The site shows up, the main template is clearly rendered and at least one child rendered but the templates waiting for data never show up. They have {{#if Template.subscriptionsReady}} wrappers. Or rather the parts inside the wrapper never show up. I'm guessing the subscriptions never complete on mobile for some reason. In fact the entire 10+ minutes I've been typing and editing this response I've had my phone sitting beside my computer trying to load the page. It's been sitting there loading for > 10 mins, the data spinner in the iOS status bar spinning constantly.
But, when I try to debug it it always works (or at least so far). It works fine in the iPhone Simulator. It works fine if I connect directly to my dev machine over WiFi. Like I said it works fine 1 or of 5 times or so on mobile. I've tried connecting to a debugger USB and then remote debug Safari but it always seems to work when I do that.
You might think it's a bad mobile connection but every other site I view seems to work just fine. Slashdot, Ars, Hackernews, GMail (the website), Facebook's website (not app), Reddit. Etc.
Any idea how I can debug this? Or is this a known issue?
Here's my code
Router.route('/', {
template: 'front',
});
-
<template name="front">
<header>
<div>
<div class="buttons">
{{> userinfosignin}}
</div>
{{> logo}}
</div>
</header>
<div class="container">
<div class="gallery">
{{> artselection sort="newest" limit="8"}}
{{> artselection sort="popular" limit="8"}}
</div>
</div>
<template name="artselection">
<div class="sortcriteria">
<div class="title">
<div>{{sort}}:</div><div class="right"> see all</div>
</div>
<div class="artgrid">
{{#if Template.subscriptionsReady}}
{{#each art}}
{{> artpiece}}
{{/each}}
{{/if}}
</div>
</div>
</template>
<template name="artpiece">
<div class="artpiece">
<a href="/art/{{_id}}">
<img class="thumbnail" src="{{screenshotLink.url}}" />
</a>
<div class="galleryinfo">
<div class="galleryname">
“{{name}}”
by: {{username}}
</div>
<div>
<a href="/art/{{_id}}">
<span class="views">{{views}}</span><span class="likes">{{likes}}</span>
</a>
</div>
</div>
</div>
</template>
I can see all of that gets rendered except the part inside the {{if Template.subscriptionsReady}}
Here's the code for that template
// in a client section
Template.artselection.onCreated(function() {
var instance = this;
instance.autorun(function() {
var sort = getSortingType(instance.data.sort);
instance.subscribe('artSelection', sort, parseInt(instance.data.limit));
});
});
Template.artselection.helpers({
art: function() {
var instance = Template.instance();
var sortField = getSortingType(instance.data.sort);
var sort = {};
sort[sortField] = -1;
var options = {
sort: sort,
limit: parseInt(instance.data.limit),
};
return Art.find({}, options);
},
});
// in a sever section
Meteor.publish("artSelection", function(sortField, limit) {
var find = {
private: {$ne: true},
};
var sort = {};
sort[sortField] = -1;
var options = {
fields: {settings: false},
sort: sort,
limit: limit,
};
return Art.find(find, options);
});
function getSortingType(sort) {
switch (sort) {
case "mostviewed":
return "views";
case "newest":
return "modifiedAt";
case "popular":
default:
return "likes";
}
}
Note: Art is a collection that's pretty much the same as Posts in any tutorial. The data is small. Just _id, username, owner, title, createdAt, modifiedAt, likes, views, hasSound. That's about it and one field settings which is a string which is at most 2-3k but I'm excluding that field in the publish method. In fact, checking the frames in the Chrome debugger when viewing on desktop it looks like only about 12k of data is sent down over the websocket before the front page is completely rendered. In other words, this isn't an issue of sending lots of data.
I'm on Meteor 1.2.1.
Update
I figured out the issue is actually Chrome's Data Saver feature. I made the bad assumption that since both are WebKit under the hood that remote debugging on Safari would help me find the issue but Chrome is doing fancy networking behind the scenes of it's embedded WebKit view. Turning off the data saver feature and it started working.
According to Google you can disable the data saver feature on the server side by adding the header
Cache-Control: no-transform
So for now I'll try adding that header to my site. Otherwise I'm pretty sure google wants it to just work so I've filed a bug
I am absolutely not sure that it will solve your problem, but have you try the "waitOn" feature of iron router (just to help you to locate the problem) ?
Apparently, you would like to be sure that your subscription to your data has been fully established with this block:
{{#if Template.subscriptionsReady}}
{{#each art}}
{{> artpiece}}
{{/each}}
{{/if}}
Could your try to create a route pointing to your template having the issue, and check if the data are loading on this route ?
Something like the following code and see if the problem persists ?
Router.route('/art_selection', {
name: 'artselection',
waitOn: function () { return Meteor.subscribe('artSelection'); },
data: function () {
return {
art: Art.find(),
}
}
});
If it is working well on the route and not on your main page, then I guess your template is not waiting your subscription to be ready the first time it renders, and do not re-render after the subscription has been completed.

Service Unavailable 503 error, request from Google App Engine app

I have been using YouTube Data API from Google App Engine app for 5 months, without getting Service Unavailable, 503 error response. But today, I got this:
YouTubeError: {
'status': 503,
'body': '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n<html>\n<head><meta http-equiv="content-type" content="text/html; charset=utf-8"><title>http://gdata.youtube.com/action/GetUploadToken</title></head>\n<body style="font-family: arial, sans-serif; background-color: #fff; color: #000; padding:20px; font-size:18px;" onload="e=document.getElementById(\'captcha\');if(e){e.focus();}">\n<div style="max-width:400px;">\n <hr noshade size="1" style="color:#ccc; background-color:#ccc;"><br>\n \n \n <div style="font-size:13px;">\n Our systems have detected unusual traffic from your computer network. Please try your request again later. Why did this happen?<br><br>\n <div id="infoDiv0" style="display:none; background-color:#eee; padding:10px; margin:0 0 15px 0; line-height:1.4em;">\n This page appears when Google automatically detects requests coming from your computer network which appear to be in violation of the Terms of Service. The block will expire shortly after those requests stop.<br><br>This traffic may have been sent by malicious software, a browser plug-in, or a script that sends automated requests. If you share your network connection, ask your administrator for help — a different computer using the same IP address may be responsible. Learn more<br><br>Sometimes you may see this page if you are using advanced terms that robots are known to use, or sending requests very quickly.\n </div><br>\n \n IP address: 74.125.19.24<br>Time: 2012-10-09T17:48:20Z<br>URL: http://gdata.youtube.com/action/GetUploadToken<br>\n </div>\n</div>\n</body>\n</html>\n',
'reason': 'Service Unavailable'
}
I am using YouTube for uploading videos from users, and also for displaying existing videos (users only input the videos URL).
Does anybody know possible reasons why it isn't working?
I am using gdata python library.
I have yt_service property defined in my video model:
def yt_service(self):
try:
return self._yt_service
except AttributeError:
yt_service = gdata.youtube.service.YouTubeService()
yt_service.developer_key = settings.SYNCR_YT_DEVKEY
yt_service.email = settings.SYNCR_YT_EMAIL
yt_service.password = settings.SYNCR_YT_PASS
yt_service.ProgrammaticLogin()
self._yt_service = yt_service
return yt_service
Then when creating upload form, view call yt_service.GetFormUploadToken to retrieve upload token. It failed in here.

Twitter Timeline through Expression Engine

Can anyone help me integrate Twitter through Expression Engine. I am new to expression engine and I have tried to follow the example the Twitter Timeline developed by the EE team but couldn't get it working.
Can anyone help me with step by step process in EE2?
Thanks
Using the example from the Twitter Timeline Plugin download page, insert the following code into one of your ExpressionEngine templates:
{exp:twitter_timeline screen_name="ladygaga" limit="3"}
<div class="tweet">
<div class="date">{created_at format="%m-%d %g:%i"}</div>
<div class="author">
<div class="icon">
<img src="{profile_image_url}" width="48" height="48" alt="" />
</div>
{name}
</div>
<div class="status">{text}</div>
</div>
{/exp:twitter_timeline}
Note: The plugin only works on public Twitter feeds, so make sure that the feed your trying to display is not private. For this example, I'm using Lady Gaga's twitter stream.
All error messages are logged in the Template Parsing Log.
Therefore if you have no output, or unexpected output, enable the Template Parsing Log in the Control Panel's Output and Debugging Preferences at: CP Home > Admin > System Administration > Output and Debugging.
Reload the page in your browser and look through the Template Parsing Log for information from the Twitter Timeline:
If you still can't get the Twitter Timeline plugin to work, post a description of your problem to the ExpressionEngine 2 Technical Support Forum — they'll be able to better help troubleshoot your issue.

Resources