PERMISSION_DENIED when trying to Turnin the StudentSubmission in google Classroom - android

I'm getting error when trying Turning the Student Submission in google Classroom.
Using following code:
mService.courses().courseWork().studentSubmissions().turnIn(mCourseWork.getCourseId(),mCourseWork.getId() ,mySubmission.getId(),turnInStudentSubmissionRequest).execute();
Getting following error:
403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "#ProjectPermissionDenied The Developer Console project is not permitted to make this request.",
"reason" : "forbidden"
} ],
"message" : "#ProjectPermissionDenied The Developer Console project is not permitted to make this request.",
"status" : "PERMISSION_DENIED"
}

When modifying assignments/courseWork or student submissions, only the Developer console project that created those objects can modify them. This means that only projects that created the corresponding course work can modify them, otherwise a 403 PERMISSION_DENIED error is returned. You can easily determine if the course work item is associated with the Developer Console project making the request by checking the associatedWithDeveloper property on the Google Classroom course work response.

Related

Android Google API Debug App working but not signed App

My Android App seems to be working fine by using code given from: google api webpage
when running in debug mode but once I generated a signed apk, and uploaded the app to the app store, the app will not log in properly. Is there any way of fixing this, or even debugging an installed app as logs will not show up in android studio?
Thanks so much.
I had same issue with Google Map Api... I had solve this.
You have to generate sha-1 key using your keystore (this keystore use/ generate when you generate signed apk).
May be, the SHA1 currently you are using for debugging purpose .
So when you are creating a signed apk u have one kestore file. try to generate new SHA1 key with this new keaystore file.
then using this keystore file create API key for signed apk.
replace debug API key already stored in manifest file and google API console with the new one.
It will work.
thanks
Your app may need to get verified by Google for the signed app to work. They really do a poor job on error messages and making the documentation clear. In fact, the error message that I was receiving was not even listed on their website!
https://developers.google.com/drive/api/v3/handle-errors
403 Forbidden
{
"errors" : [ {
"domain" : "usageLimits",
"reason" : "dailyLimitExceededUnreg",
"message" : "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
"extendedHelp" : "https://code.google.com/apis/console"
} ],
"code" : 403,
"message" : "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
}

Android Google Drive API Exception: 403 Forbidden

I'm developing an app that has access to user's appdata folder on Google Drive. When I am on debug mode, the app works fine. When I make a release of the app and I try to connect to Google Drive it give me this error after I choose which account to connect:
com.google.api.client.googleapis.json.GoogleJsonResponseException:
403 Forbidden
{
"errors" : [ {
"domain" : "global",
"reason" : "insufficientScopes",
"message" : "The granted scopes do not give access to all of the requested spaces.",
"locationType" : "parameter",
"location" : "spaces"
} ],
"code" : 403,
"message" : "The granted scopes do not give access to all of the requested spaces."
}
I used this way to connect to Google Drive: https://developers.google.com/drive/v3/web/quickstart/android
I also make one credential for debug and one for release mode in Google Dev Console.
How can I solve this problem?
Any help is apreciate. Thanks buddies!
I had the same problem and the official ProGuard configuration here solved it for me:
https://github.com/google/google-api-java-client/blob/57fe35766cbba0a0d5a9a296be81468d730a29f8/google-api-client-assembly/proguard-google-api-client.txt

Google calendar API not working in signed apk

I integrate Google Calendar api properly and also works fine in unsigned apk.
But while i signed my app and try to access google calendar at that time api return below error.
Error com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "usageLimits",
"message" : "Access Not Configured. The API (Calendar API) is not enabled for your project. Please use the Google Developers Console to update your configuration.",
"reason" : "accessNotConfigured",
"extendedHelp" : "https://console.developers.google.com"
} ],
"message" : "Access Not Configured. The API (Calendar API) is not enabled for your project. Please use the Google Developers Console to update your configuration."
}
I also enabled Google Calendar api, CalDAV api.
So, I face this only in signed apk. unsigned is work perfect.
So, any one have idea that how i can resolve this issue?

Google custom search on Android failed with error 403

Google Custom Search is returning this 403 error from my app. This is the response when run from my phone:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
],
"code": 403,
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
}
The solution for the iOS version is given here:
Google Custom Search: 403 error in iOS
Thanks for any thoughts on what's wrong!

Google Calendar API: Calendar usage limit message occur and accessNotConfigured

403 Forbidden
{
"code": 403,
"errors": [
{
"domain": "usageLimits",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project.",
"reason": "accessNotConfigured"
}
],
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
I have already activated the api for google calendar. What can I do with that? I have also set the key but I am still getting error.
If you are using eclipse to build the application directly, you need to use debug key SHA1 for credential. You can find that in preferences > android > build.

Categories

Resources