Not Able to fetch assignment "Blackboard" - canvas-lms

How to fetch assignment from course? I am using below API for getting content.
But I am getting this:-
{
"status": 404,
"message": "API is not found for the specified URL."
}
https://apporto-test.blackboard.com/learn/api/public/v1/courses/{courseId}/contents

Related

dialogflow projects.agent.intents.get doesn't work

I try testing the rest api v2 and "try this api" doesn't work
the name parat is projects//agent/intents/test2Intent
I got the error:
{
"error": {
"code": 400,
"message": "'test2Intent' is not a valid intent ID. Must be a UUID.\ncom.google.apps.framework.request.StatusException: \u003ceye3 title='INVALID_ARGUMENT'/\u003e generic::INVALID_ARGUMENT: 'test2Intent' is not a valid intent ID. Must be a UUID.",
"status": "INVALID_ARGUMENT"
}
}
It looks like test2Intent isn't correct. Where is find the intent id? test2Intent is a name of intent and I can't find the intent id

HttpError 500 when requesting https://www.googleapis.com/youtube/v3/playlists?part=snippet%2Cstatus&alt=json returned "Internal error encountered."

Getting 500 error when making a https://www.googleapis.com/youtube/v3/playlists request.
I'm using the python implementation provided here:
https://developers.google.com/youtube/v3/docs/playlists/insert.
The same request worked yesterday, so I tend to believe this is not on my side.
Is there anything I might be missing?
The message error usually is more descriptive than the one you put. I had the same problem than you (same message and just yesterday) and tryed a direct call to YouTube API via this page: (you will see a try it pane in the right where you can easily put the call parameters): https://developers.google.com/youtube/v3/docs/playlists/insert
After executing it, I cuolud find the complete error message that was:
{
"error": {
"code": 500,
"message": "Internal error encountered.",
"errors": [
{
"domain": "youtube.api.v3.PlaylistInsertResponse.Error",
"reason": "RATE_LIMIT_EXCEEDED"
}
],
"status": "INTERNAL"
}
}
Probably calling the API in that way will give you the full detailed reason of the error.

Agument list files API call with createdTime attribute in Google Drive API

I'd like to retrieve all the resources (files and folder) via the Files: list
API call with the createdTime attribute included.
Standard response doesn't include the createdTime key described in the resource representation so I've added the fields query parameter with the value createdTime (there's an open issue related which says so but referring to API v2 while I'm using API v3).
API call I'm doing is the following:
https://www.googleapis.com/drive/v3/files?fields=createdTime
with proper authentication.
A 400 status code response is returned with the following body:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalidParameter",
"message": "Invalid field selection createdTime",
"locationType": "parameter",
"location": "fields"
}
],
"code": 400,
"message": "Invalid field selection createdTime"
}
}
What's the correct way of using the fields query parameter?
If you want to see the full response you can do the following test here
https://www.googleapis.com/drive/v3/files?fields=*
If you just want the create date you can also do test here
https://www.googleapis.com/drive/v3/files?fields=files(createdTime)
You can read more about this in Partial response

Why are attempts to view revisions with the Google Drive API returning a 500?

I've been working with the Google Drive API for a bit, accessing the list of revisions for two sheets as part of a job with service.revisions().list(fileId=FILE_ID).execute(). Everything was fine until earlier this morning, when one of the requests (but not the other) started returning a 500 error. This isn't intermittent - it's returning this error on every request so an exponential backoff just hits the cap I've set (5).
There's nothing of value in the response but here it is:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "internalError",
"message": "Internal Error"
}
],
"code": 500,
"message": "Internal Error"
}
}
I get the same error when querying with the API explorer, so this seems to be an issue with the sheet itself as opposed to a coding problem. Here's the request URL:
https://www.googleapis.com/drive/v3/files/1KYDm4gqaCLipQTskbqQbesq8ON7CmV_4IscF8V0FZrs/revisions?key=YOUR_API_KEY
What could suddenly cause this change in behavior?

Google Search Console 401 Bad Request issue without using Client Library

So, Here are 3 steps.
I called oAuth2 with following url:
https://accounts.google.com/o/oauth2/v2/auth
?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fwebmasters%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fwebmasters.readonly
&client_id=___.apps.googleusercontent.com
&redirect_uri=urn:ietf:wg:oauth:2.0:oob
&response_type=code
&approval_prompt=force
&access_type=offline
I get the code, suppose: 4/QVgPaCMqp94____qBC4NY_d54IcRj7U9mJc
Then I'm making a request for access_token, by making a POST request to https://accounts.google.com/o/oauth2/token with client_id, client_secret, redirect_uri, grant_type, and I get a JSON like:
'access_token' => ya29.CjHzAgC4js6Guv-1pt_rE____q8XIxiXOXOaSZW9NLRjKCTI3izBi,
'expires_in' => 3600,
'refresh_token' => 1/dL3ENA-EVI0rEb6D-OGqw_____iFe2ZNdEq4,
Now, I am making a request with that access_token or in cases of expiry with a renewed access_token to Google Search Console, which I have added in scopes.
My request is similar to this: https://developers.google.com/webmaster-tools/v3/urlcrawlerrorssamples/list#try-it
But I get an 401 unauthorized error, with a json like following:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Login Required",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Login Required"
}
}
Considering I have done the process correctly, I think I have missing some parameters or providing some wrong value.
I have not used Google Client Library, instead used the REST API framework directly.
Can anybody give some clue please? Thank you.
The reason is, URL query parameter must be ?access_token= and not ?key= The later can be used only in case of direct API access and not oAuth.