I followed the instructions on https://developers.google.com/classroom/guides/push-notifications?hl=en to receive push notifications on a GCloud PubSub topic. I have made sure that the right permissions are given to the topic and it exists.
When I try to register an authenticated user using registrations.create API with the following body:
{
"feedType": "COURSE_WORK_CHANGES",
"courseWorkChangesInfo": {
"courseId": "..."
}
}
I then get an error saying something along the lines of "HttpError 403 ... the caller does not have permissions"
I have made sure that the access token has the right scopes:
https://www.googleapis.com/auth/classroom.rosters
https://www.googleapis.com/auth/classroom.coursework.students
https://www.googleapis.com/auth/classroom.push-notifications
Any ideas on why the registrations.create call fails? There were no error_details in the error object either.
Related
I am trying to get the User account information for which I am trying to Test using Slack Tester.
api.slack.com/methods/users.profile.get/test
when I give my Token and click on Test I am getting the error below:
{
"OK": false,
"error": "missing_scope",
"needed": "users.profile:read",
"provided": "identify,bot,incoming-webhook"
}
Your token is missing the required scopes.
As the error message says you need the scope users.profile:read to run the API method users.profile.get.
To get a token with the needed scope you need to add the scope to your Slack app and reinstall into the workspace.
Also this API method will not work with bot tokens. You need to provide a user token aka Oauth Access Token.
When I try to use the rtm.connect method with own token, tester returns me a false response.
URL : https://slack.com/api/rtm.connect?token=xoxp-532016xxxxx-53xxxxxx-536743xxxxxx-9211bedc4bfe9ddfexxxxxxxxxxxxxx&pretty=1
{
"ok": false,
"error": "missing_scope",
"needed": "rtm:stream",
"provided": "identify,incoming-webhook,channels:history,im:history,channels:read,im:read,team:read,users:read,users:read.email,users.profile:read,chat:write:user,files:write:user"
}
What am I missing in request? Why does this missing_scope error occur? I already followed the Slack documentation.
You need to first create user bot. Follow this link and create one.
Then you will get Bot User OAuth Access Token under Install App in left Navigation bar.
Use this Bot User OAuth Access Token for above request.
My application uses Outlook Push Notifications REST API to get updates for a set of users.
The code I use to make the registration is like following:
HTTP POST to:
https://outlook.office.com/api/v2.0/users/<user email>/subscriptions
POST data = {
'#odata.type': '#Microsoft.OutlookServices.PushSubscription',
'Resource': 'https://outlook.office.com/api/v2.0/me/messages',
'NotificationURL': 'https://<my_valid_hostname>/api/subscriptions',
'ChangeType': 'Created, Deleted',
'ClientState': <user UUID>,
}
This code always worked fine, but since Sep 26 it stopped to work for mostly of users. The HTTP request to make a registration to web notification returns HTTP 403 error:
HTTP 403 Error: https://outlook.office.com/api/v2.0/users/<user email>/subscriptions
{
"error": {
"code": "ErrorAccessDenied",
"message":"Access is denied. Check credentials and try again."
}
}
This application is a backend aplication registered in Azure AAD portal and uses a token which allow me to do the requests on behalf of the users.
My token credentials are working fine. I use the same token for Graph API and Outlook API without errors. I refreshed it to see if the error go away, but it doesn't work. The error comes for fresh tokens anyway.
For some users I get no error, it always work. The subscription is created fine and I get the subscription data in JSON returned, as usual.
This make me think that it may be a problem in Microsoft side, but I have no way to check this.
So how can I fix this error for the affected users?
First thing that comes in my mind is that did you forgot to renew your calendar subscriptions? It's something like max. 14 days those are alive. Anytime before expiration you can renew subscriptions and after that you still can revive subscriptions.
In fact now I tested new subscription with my app and I get only 7 days to expiration date.
At this point I got that you are getting error when creating new subscription.. are you sure your access_token is still valid?
For future SO users,
POST https://outlook.office.com/api/v2.0/me/subscriptions
Content-Type: application/json
Authorization: Bearer <access_token>
{
"#odata.type":"#Microsoft.OutlookServices.PushSubscription",
"Resource": "https://outlook.office.com/api/v2.0/<Outlook-Resource>",
"NotificationURL": "<My-Endpoint-Url>",
"ChangeType": "Created,Updated,Deleted"
}
Optional ClientState in body, allows the listener to check the legitimacy of the notification.
Check out the docs for more info.
I've been trying to authenticate my oAuth consumer to the Magento application for 2 weeks now. I just can't seem to get a break through.
I've configured the REST roles and attributes to make everything accessible. Now the next step is to get a request token.
I've been trying to authenticate using Google Chrome's REST client at the url - /oauth/initiate. I've entered all the parameters needed to authenticate the app namely -
consumer key, consumer secret, oauth version, timestamp, nonce, signature method.
But the error I get is this -
{
messages: {
error: [1]
0: {
code: 401
message: "oauth_problem=parameter_absent&oauth_parameters_absent=oauth_token"
}
}
}
Which seems very strange to me, cause there are no parameters absent from what I can make out. Someone please help me out. I've been stuck on this badly.
It means that Magento isn't returning the parameter oauth_token.
So there is something else wrong with your request. The first time I ran into this, it was because I wasn't providing an oauth_callback parameter.
I am trying to fetch user events from facebook but I am having some problem witht he request. I can access their profile image and their UID but for some reason when I try to access the events I get the following error:
{
"error": {
"type": "QueryParseException",
"message": "An active access token must be used to query information about the current user."
}
}
I have an active access token, that's what I am using to access the UID and profile pic but for some reason the events do not show up.
This is my call:
events
my login button looks like this:
<fb:login-button perms="user_events"></fb:login-button>
It also throws an error after login in.
The error is this:
The application must ask for a valid extended permission.
The invalid permissions requested were: .
I think your call url should look like this:
http://graph.facebook.com/me/events?access_token=[Your oAuth token]