Google Classroom API Error Code 403 The caller does not have permission PERMISSION_DENIED - google-workspace

I followed the qucikstart tutorial on https://developers.google.com/classroom/guides/manage-courses for creating a course. However, I got the Error 404 PERMISSION_DENIED. I also tried the request on the API Explorer and got the same error. Can someone please advice me on how to create the credentials sufficient for creating a Classroom Course. Appreciate all help.

Check if the user you are using is using the correct scope for Creating Course. I guess the user should specify the scope - https://www.googleapis.com/auth/classroom.courses (Manage your Google Classroom classes). Also there is a API which you can invoke for a user to know if he has permission to create course. Check this documentation-
https://developers.google.com/classroom/reference/rest/v1/userProfiles#permission

Related

buildTokenWithUid Unity

I am trying to set up user accounts using Unity.
I am unable to locate the method "buildTokenWithUid". Which API call should I make or which class this method "buildTokenWithUid" belongs to?
I have successfully registered user account, I have a channel name, I just need the token hence wanted to use "buildTokenWithUid".
Please can someone help?
There is no such API. Where did you find it from?
Token related information can be found in FAQ.

"PERMISSION_DENIED" on Google Spreadsheet REST API v4

I try to read data from google sheet via http. I use v4 google spreadsheet api:
https://sheets.googleapis.com/v4/spreadsheets/1MZJEOzkzy5iJ9HPy2GU-Ky3vdaIzGGDQH8BMt4n3OGI/values/Sheet1!A1:D5
I get:
{
"error": {
"code": 403,
"message": "The request cannot be identified with a client project. Please pass a valid API key with the request.",
"status": "PERMISSION_DENIED"
}
}
Sheet is published online and everyone can edit it. It works on api v3 too.
First, make sure you have a permission to call this spreadsheet and you enable the Sheets API in your developer console. You can also try to change the privacy settings of this spreadsheet to public and checked if you can access it now. This 403 error is usually caused by incorrect or missed some configuration in Authorizing Requests. If you authorizing requests with OAuth 2.0, make sure you use the proper scope with it.
For more information, you can check this thread on how to debug your Google OAuth 2.0 token when you get HTTP 401s or 403s
You have to append the string "key=yourAPIkey" as query on your URI. The API key is generated in the developer's console
If you update application access scope you have to re-authenticate the application and update credentials.json.
In google-sheet quick start guide, they have started the tutorial with only read scope. If you want to write or update google-sheet later you will have to change the scope there and update the credentials.json again
Look carefully when you first authenticate it only giving permission to read. But if update scope and try to re-authenticate it will ask for permission to read and manage sheet permission.
In order to update the scopes, you need to remove the token file saved in TOKENS_DIRECTORY_PATH, execute the code again and log in. Then Oauth2 will give you the new updated tokens.

PayPal GetUserLimits Explanation

PayPal AdaptivePayments API has method GetUserLimits can anyone explain its purpose?
We have already tried to make the call but it throws "Internal Error (520002)"
The GetUserLimits API is used to get the various deposit/withdrawal limits of a specified account. This API requires special permission as it's use is not granted to everyone.

getInsitutions failing on new user

In the .NetAggCatSample app, I've found that calling getInstitutions with an existing user context seems to work fine, but for new users, I'm getting an exceptions (message = "forbidden").
Could this be due to running into the max user limit in Dev mode (which I am in)?
Also, which API call actually creates the user at Intuit?
To add the answer,
Any API call after retrieving OAuth tokens from the SAML assertion will create the user in the system. As you mentioned, you are most likely getting the 403 error because you are at your max customer limit. Please enable logging and post the response XML from the call that returns a 403:
http://docs.developer.intuit.com/0020_Aggregation_Categorization_Apps/DevKits/0250.NET_AggCat_DevKit_1.0/0006_Logging#Request_and_Response_Log
thanks
Jarred

Error when reading from mailbox

My application, created today, runs fine when I use it with my account. On any other account however, the following error is sent back as a response:
message: "(#298) You must be a developer of the application"
type: "OAuthException"
The exact code I'm using to send the request is this:
FB.api('/me/threads', {limit: 1000}, function(response){ ....
I have found someone experiencing the same problem, but the response he accepted didn't really provide any useful information. ( Reading over inbox, I get error #298).
Anyone have a clue on how to solve this? Would be greatly appreciated!
I'm guessing you have the read_mailbox permission?
Try accessing the /me/inbox connection instead?
Facebook tells you (from http://developers.facebook.com/docs/reference/api/thread/):
Please note: We are in the process of making the new messages system
available to all users, at which point this API will replace the
/inbox/ Graph API endpoint. We are providing early access to this API
for registered developer accounts only until the new messaging system
is broadly available. You should use the /inbox endpoint for
production applications at the current time.
That is, only the current apps developers will be able to use the threads-connection for now (but it will be available later).
It looks like your other account doesn't have a developer license/flag/attribute, thus failing the authentication check.