I was trying Vimeo live streaming API and was following this guide https://developer.vimeo.com/api/live/events.
However at step 2: https://developer.vimeo.com/api/live/events#managing-a-live-event-step-2
I am getting this :
{
"error": "Unable to upload a video. Please contact the app's creator.",
"link": null,
"developer_message": "Invalid upload approach provided. The only valid approach for versions greater than 3.0 are `streaming`, `pull`, ' .\n '`post`, and `tus`.",
"error_code": 2230
}
my curl request looks like this :
curl --location --request POST 'https://api.vimeo.com/me/videos' \
--header 'Authorization: bearer {token}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/vnd.vimeo.*+json' \
--data-raw '{ "upload": { "approach": "live" } }'
I have a premium account and the token is correct. I tried other values for upload.approach as suggested in the error message but nothing works for live streaming. Any help is appreciated.
You're a Vimeo Premium member, an Enterprise account is required to access the Live API:
To qualify, you must be a Vimeo Enterprise customer or a Vimeo development partner.
See the first bullet point here: https://developer.vimeo.com/api/live/events#before-you-begin
#Ashish Yes premium membership is enough only if you are handling live stream through Vimeo Website.
But accessing through api for events you must have Enterprise membership.
We can't use without Enterprise version, even we also suffering from the same issue.
They also mentioned this one under pricing (check image) and I was told that they did this intentionally.
Related
When exporting a large google doc as a pdf I am experiencing a timeout issue. I am currently using this REST API. Is there a way to allow me to export larger documents? Maybe there is a way to change the timeout duration or upgrade to a paid version in the google cloud console.
Use exportLinks instead under Files: get instead as Files: export does have a limit of 10mb.
Sample:
curl \
'https://www.googleapis.com/drive/v3/files/[FILE_ID]?fields=exportLinks&key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--compressed
And it will provide you an output that contains all possible export links available (that doesn't have a file size limit)
Output:
{
"exportLinks": {
"application/rtf": "https://docs.google.com/feeds/download/documents/export/Export?id=[FILE_ID]&exportFormat=rtf&resourcekey=[RESOURCE_KEY]",
"application/vnd.oasis.opendocument.text": "https://docs.google.com/feeds/download/documents/export/Export?id=[FILE_ID]&exportFormat=odt&resourcekey=[RESOURCE_KEY]",
"text/html": "https://docs.google.com/feeds/download/documents/export/Export?id=[FILE_ID]&exportFormat=html&resourcekey=[RESOURCE_KEY]",
"application/pdf": "https://docs.google.com/feeds/download/documents/export/Export?id=[FILE_ID]&exportFormat=pdf&resourcekey=[RESOURCE_KEY]",
"application/epub+zip": "https://docs.google.com/feeds/download/documents/export/Export?id=[FILE_ID]&exportFormat=epub&resourcekey=[RESOURCE_KEY]",
"application/zip": "https://docs.google.com/feeds/download/documents/export/Export?id=[FILE_ID]&exportFormat=zip&resourcekey=[RESOURCE_KEY]",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "https://docs.google.com/feeds/download/documents/export/Export?id=[FILE_ID]&exportFormat=docx&resourcekey=[RESOURCE_KEY]",
"text/plain": "https://docs.google.com/feeds/download/documents/export/Export?id=[FILE_ID]&exportFormat=txt&resourcekey=[RESOURCE_KEY]"
}
Reference:
https://stackoverflow.com/a/59168288/14606045
I am doing automation to get opening tickets details so i am executing web service call in FreshService ticketing tool.
Below is my web service call using CURL and GET
curl -X GET -H 'Content-Type: application/json' -v -i 'https://support.XXXXXXX.com/helpdesk/tickets/9725.json?-u=ASDDDECDFF%3AX%20'
When i am executing only getting below response in body.
{
"require_login":True
}
But my output joson file visible after opening that url in browse i can see json file, so i execute below vbsctipt to send HTTP request for read the JSON file but same ""Require_login":True" coming.
Dim o
Set o = CreateObject("MSXML2.XMLHTTP")
o.open "GET", "https://support.XXXXXXX.com/helpdesk/tickets/9723.json", False
o.send
msgbox o.responseText
So my expectation to get JSON file in body part of web service response or through vbscript get JSON file store locally.
Appreciate any other light wight tool or easy approach. More about Fresh service API details https://api.freshservice.com/#introduction
After i encoded my authentication key with base64 and addd Authorization as header and its working now.
Update Web service URL,
curl -X GET -H 'Content-Type: application/json' -H 'Authorization: Basic XXXXXYYYYYZZZ' -v -i 'https://support.XXXXX.com/helpdesk/tickets.json'
We are using the Google Drive API to perform certain file-related operations in our application. One of our use cases is to change particular folders owner.
I have return below code to perform this action
Permission permission = new Permission();
permission.setRole(Permission.OWNER.getRole());
permission.setType(Permission.OWNER.getType());
permission.setEmailAddress(email);
googleDrive.permissions()
.create(fileId, permission)
.setSendNotificationEmail(false)
.setTransferOwnership(true)
.execute();
When attempting to change the owner, we got an error from Google.
{
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Forbidden"
}
],
"code": 403,
"message": "Forbidden"
}
}
We have checked errors listed here at https://developers.google.com/drive/web/handle-errors. But, I didn't found any error with above detail.
When I have attempted to change ownership of a particular file using the same code, it worked fine.
Does anyone have any idea on what I'm missing or what might be the issue?
Also, the same works when I've used cURL to change folder ownership
curl POST \
'https://www.googleapis.com/drive/v3/files/[FILE_ID]/permissions?transferOwnership=true' \
--header 'Authorization: Bearer [ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"role":"owner","type":"user","emailAddress":"[EMAIL]"}'
Forbidden
Normally means that the user you are logged in with does not have the access themselves to do what you are trying to do. So in order to change the owner i would suspect that you would need to have write access to that file or be the owner of the file itself.
For example i cant login and change the owner on a file that you own I dont have enough access to the file.
You may also want to check the scope you are authenticating with.
I am currently trying to update the user permissions on a project with the function PATCH: project / users (v2) for several services (BIM Docs, Field, Glue, Plan and Schedule) but for other services that Docs I have an error telling me that the services are invalid.
Code documentation here.
When I put only the permissions for project administration and Docs, it works.
However, i want to use the other services. So, when I set permissions for Docs, the rights for others are removed.
After several searches, I can't find a way to perform this command in cURL.
Here is the content:
curl -H "Content-Type: application/json"
-H "x-user-id: %user_admin_id%"
-H "Authorization: Bearer %TOKEN%"
-X PATCH https://developer.api.autodesk.com/hq/v2/accounts/:account_id/projects/:project_id/users/:user_id
-d '{
"services":
{"document_management":{"access_level":"user"},
"field_management:{"access_level":"user"}
},
"company_id":"%company_id%",
"industry_roles":["0b74b631-0a08-49ad-8f44-ada57d7de051"]
}'
Here the error :
"error":[{"message":"Invalid services
[\"field_management\"]","code":2000}]
I already tried field instead field_management.
Any solutions ?
Thanks.
You can not set permission through API, yet.
You can set a service to a project:
https://developer.autodesk.com/en/docs/bim360/v1/reference/http/projects-POST/
services-type parameter.
You also need to have a license to those sub services.
I have a simply Json file stored on a ftp and when I call the url http://myurl/example.json, I receive a plain/txt type file.
How can I solve the problem ?
Thanks for any help :)
Whether file is stored on server via FTP or any other method is irrelevant. What matters is that you are requesting the file over HTTP. So you need to work on your HTTP request and response headers.
One thing you may try first, is setting the headers of your request. Here's a curl example I randomly found, that shows that (application/json is the interesting part).
curl -i -u application_name:application_password --data '{"value": "my_password"}' http://localhost:8095/crowd/rest/usermanagement/1/authentication?username=my_username --header 'Content-Type: application/json' --header 'Accept: application/json'
What also matters is the response headers that the server assigns. If you have access and rights, ensure those are set, too. A good starting point: review current response headers.