Facebook API App Access Token - ruby-on-rails

I've been using for many years my FACEBOOK_APP_ID|FACEBOOK_APP_SECRET as an app access token for accessing the facebook API, but lately it seems to be giving me not up to date data.
For example, on this page:
https://www.facebook.com/pg/Vallagruppen/posts
If I just view in the graph explorer with the default access tokens, I get the correct results:
https://developers.facebook.com/tools/explorer/?method=GET&path=Vallagruppen%2Fposts&version=v2.11
But if I change the access token in the explorer to one like above, with an APP_ID|APP_SECRET I am suddenly not getting all the posts, the newest few are not showing up.
Additionally it will say: "Access Token Info Warning Failed to debug token"
Any idea why?

Related

My app is not able to send message to Teams channel using graph api

I am trying to send message to teams channel using graph api. I am able to send the messages using my personal(user) tokens but not able to do it using an app which I have registered in Azure portal. My app also got access to protected apis from Microsft Teams.
Attaching the screen shot of app permissions and code snippet on how I am getting tokens.
app permissions
Code snippet to get tokens
One thing I noticed, when I decoded the the tokens I am getting, that roles in tokens only shows application permissions("Teamwork.Migrate.All") and it doesn't show delegated permissions("ChannelMessage.Read.All","ChannelMessage.Send","Teamwork.Migrate.All").
Below are the error message I am getting.
While doing get request to https://graph.microsoft.com/v1.0/teams/{teams_id}/channels/{channel_id}/messages
one of 'ChannelMessage.Read.All' or 'ChannelMessage.Read.Group' when using resont. Roles on the request 'Teamwork.Migrate.All' and resource specific consent g request ''", 'innerError': {'date': '2021-07-04T14:27:41', 'request-id': '8c1f-e345bf15da7b', 'client-request-id': '8c1fffc2-c94d-4d5b-a81d-e345bf15da7b'}}}
While doing post request to https://graph.microsoft.com/v1.0/teams/{teams_id}/channels/{channel_id}/messages/{message-id}/replies
{'error': {'code': 'Unauthorized', 'message': 'Unauthorized', 'innerError': {'d4:26:47', 'request-id': '44fe99be-1ed8-4505-a3e7-a88ce934e3f8', 'client-request8-4505-a3e7-a88ce934e3f8'}}}
You are currently using Get access without a user(Application permission). Application permissions are only supported for migration. Instead you should try delegated flow: Get access on behalf of a user. Please go though the documentation and you can try it using Postman or Fiddler.
You can also try Get started with Microsoft Graph and Python tutorial which shows fetching calendar information using Graph APIs.

Accessing Google IAP OAuth 2.0 protected website using C# .NET - error getting tokens in OAuth Playground

One of the websites we used to get data from requires now log in via Google, I have been granted access, and want to update the app to continue working.
I've set up credentials (clientId, clientSecret) as well as service account - whichever is easier tbh.
The url I'm trying to access looks like "https://xxxxxxxxxxxxxx.appspot.com/view/company_name"
When logging in manually, I'm being informed that:
To continue, Google will share your name, email address, language preference and profile picture with iap.googleapis.com.
Trying to get it working first on:
https://developers.google.com/oauthplayground/
But each time I select scope (guessing here) Google OAuth2 API v2 (userinfo.email, userinfo.profile) and get the tokens I end up receiving following error message:
Invalid IAP credentials: Expected JWT to have 3 parts separated by a '.' but there are 2 parts
Could anyone tell me all the things I'm doing wrong here?

Twitter App showing code: 89 Invalid or expired token

I have an app that uses the Twitter API where users can authenticate via twitter and retweet/like/follow through my app. Randomly this week the logs are showing "code: 89 Invalid or expired token".
Naturally, I go login to twitter to see the status of my app, and nothing seems out of the ordinary. I saw others with this issue had success regenerating their keys and replacing them in their application.
This didn't help.
One important thing to note is nothing has changed in the code of my application for the last 3-4 months, so I doubt it's anything in there. It's been working for over two years without any issue.
The thing I suspect the most is perhaps Twitter decided to suspend my app; Although, I don't see anywhere that is the case, and I thought I'd receive an email from them about it if it were.
I'm at a loss and would appreciate some possible solutions or alternative avenues I can pursue to find the culprit.
The keys associated with your app are the API Key (Consumer Token) and API secret key (Consumer Secret). The error you're getting is for the Access token, which belongs to the user. It sounds like the user associated with that request needs to authorize your app again before it can operate again with their access key. This can happen if the user removes authorization for your app by visiting their Settings/Privacy and safety/Apps and sessions.
If you were using your own access token in a scenario like single-user authorization, then regenerating the key might work, but in this case, the only way to get new keys for that user is for them to go through the sign-in process to authorize your app again. e.g. you could log who the user was that the error occurred on and send them a notification to re-authorize.

Working to set up Youtube API credentials - Error: deleted_client The OAuth client was deleted

I am trying to log into my youtube account to access and build a reporting job. Trouble is I set up the Web Application, and set up the OAuth consent screen with the name of the application and am getting a 401. That’s an error.
Error: deleted_client
The OAuth client was deleted.
I've already tried renaming the product name to the application name, and have an email set up. Other than that, nothing on the web really answers the question.
This is the image of the error that i'm seeing

Online meeting using Microsoft Graph API

I am working on an Angular 7 application that uses GraphAPI. I am trying to create an online meeting from this application.
Each time I send a POST request I get 'Forbidden' as response. I have used apis's with Delegated permission before and it works.
Since online meeting requires 'Application Permission' I am not sure where to specify it. Could anyone help me with this?
You specify the permissions in App Registration > your app > settings.
You have a problem with the way you are trying to access the token. I used to get the same error however, got resolved by passing userName and Password as well in the auth request and using grant_type as password.

Resources