dialogflow projects.agent.intents.get doesn't work - google-apis-explorer

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

Related

Non-existent param "Fingerprint" in google contactsGroup api

I'm trying to update the label in google contacts using the method from the docs
https://developers.google.com/people/api/rest/v1/contactGroups/update
Got a response
{
"error": {
"code": 400,
"message": "Fingerprint is missing.",
"status": "INVALID_ARGUMENT"
}
}
Even though Google API Explorer
How solve this, maybe someone can help. What does this Fingerprint mean? I can create/delete label but not update!
You have to include the etag.
If you go to Method: contactGroups.get or the Method: contactGroups.list, on the response you will find the groups 'etag'
Then on the Method: contactGroups.update request body you set the new name you want the group to have and also include the etag like this:
{
"contactGroup": {
"name": "newOne2",
"etag": "r*****k="
}
}

Not Able to fetch assignment "Blackboard"

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

Connectwise Ticket API: Invalid ServiceNote Object

I've been trying to add a note to an existing ticket with the rest api
endpoint: cw.mycompany.com/v4_6_release/apis/3.0/service/tickets/1327224/notes
request body:
{
"text":"Test message"
}
However, I get the following response:
{
"code": "InvalidObject",
"message": "serviceNote object is invalid",
"errors": [
{
"code": "ServiceNote",
"message": "Please choose where to display the notes in order to save this record.",
"resource": "serviceNote",
"field": "detailDescriptionFlag, internalAnalysisFlag, resolutionFlag"
}
]
}
What do I need to add to my request to add the note to my ticket? I don't see anything in the ServiceNote Object that looks like a "display location" or something to that effect anywhere.
Thanks,
~Josh
Provide one of the "field" values listed in the error as a boolean; either detailDescriptionFlag, internalAnalysisFlag, or resolutionFlag.
Most likely you'll be using detailDescriptionFlag. An example payload for this would be:
{
'text' : 'Hello World',
'detailDescriptionFlag' : true
}
None of this is covered in their REST documentation for Create Service Note.

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

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.