Fail to call API even though my logged-in email has read-permission to GAds - permissions

My email has read-permissions to a Google-Ads account.
Nevertheless I fail to call gAds API via apps script and get this error:
"The caller does not have permission","status":"PERMISSION_DENIED"
The app-script works when I call using my owned g-Ads api.
Any idea what is missing?

Related

How do you know that results from an external API call are not compromised?

Let's say you use Firebase for your DBMS. You expect to call an API and get back some data results. How do you know that data result is true and correct?
You obviously call the Firebase API with the necessary user credentials/etc, but how do you know the system you are calling has not been compromised via hackers/internal maliciousness/man-in-the-middle/etc?

Google Classroom API courses.teachers.create

I'm trying to use the courses.teachers.create method but I can't get it to work, error 403 returns.
code 403 message {The caller does not have permission} status PERMISSION_DENIED
My API if authorized to allow users to create courses, according to the scope indicated in the API documentation.
And already check the user and if you have CREATE permissions but it still does not work, it is the only method that does not work for me, because when I try to eliminate a teacher everything works correctly.
I already did tests on the API reference page and it shows me the same error.
I found the problem, and it is because to be able to create teacher it is necessary that my account be a domain administrator.

Bad Request returned when calling Yammer Oauth api for Impersonation

I'm working on building a powershell script to update user's profiles in Yammer. I need to be able to update users' subscriptions (followers) in their yammer profile and in order to do that, I need to get an auth token for that user (impersonation). According to Yammer's api documentation (https://developer.yammer.com/docs/impersonation), I need to be a verified admin (I am). I've registered my app with Yammer, I have a bearer token for my app which I'm passing in the auth header, and I'm passing in the consumer key and user_id for whom I want to impersonate in the api request query string. The api is responding with a 400 - Bad Request. The error message states that the request cannot be fulfilled due to bad syntax. I'm testing this using Postman. I am sending a GET request to the API as shown below. Obviously, I have actual values for the userId and consumerKey values. Does anything appear incorrect with this query and/or does anyone have any experience with this api that could possibly share some insight?
https://www.yammer.com/api/v1/oauth/tokens.json?user_id=userId&consumer_key=consumerKey

How to get a EWS token that has write access from Office.js

I need to set the category of mail item using EWS.
Basically I set it like so (VB code)
If Not outlookItem.Categories.Contains("MyCategory") Then
outlookItem.Categories.Add("MyCategory")
outlookItem.Update(ConflictResolutionMode.AlwaysOverwrite)
End If
This fails with an exception
The requested web method is unavailable to this caller or application.
Now, I found that this is because I'm using a token produced by the office API method getCallbackTokenAsync to authenticate with EWS. Apparently this token is read-only.
I am looking for suggestions for an alternative way to use outlooks credentials to authenticate with EWS. I would much prefer to work with the managed API.

Twitter GET users/search client_credentials: Your credentials do not allow access to this resource

I have a static list of music artists and i want to get the id or screen_name of each one of them in Twitter.
I found this api endpoint: users/search which allows to run a query on Twitter and get all the accounts that match with the query. For example:
https://api.twitter.com/1.1/users/search.json?q=muse
will return all the accounts that match the query "muse".
I need to call this endpoint in client_credentials flow, i don't need any permission by the user (which is only me in any case). The problem is that Twitter returns the following response when i try to access the endpoint in client_credentials flow:
"message": "Your credentials do not allow access to this resource", "code": 220
I have tested other API endpoints such users/show, statuses/retweets, statuses/user_timeline and they all works in client_credentials, just the one i need doesn't work.
Is there anything i can do about that? Or i must change the OAUth flow?
mentioned error,
"{"errors":[{"message":"Your credentials do not allow access to this resource","code":220}]}"
comes when requesting an end point which requires a user context (such as statuses/home_timeline) using application only token.
You can verify whether or not same error comes for end points like statuses/home_timeline or statuses/retweets_of_me. These end points work only in some twitter user context. The end point that you want, users/search, also requires user context.
I am suspecting some issue in obtaining oauth token and secret. How are you getting authorized tokens for a given twitter user account?