LoginApi ERROR Restsharp.addfile - docusignapi

Currently using RestSharp V106.1.0 as well a v2.1.8
While attempting to integrate docusign with our application I received an error off of the loginAPI:
string accountId = loginApi(username, password, integratorKey);
Receiving this error
{"Method not found: 'RestSharp.IRestRequest RestSharp.RestRequest.AddFile(System.String, System.Action`1, System.String, System.String)'."}
I have verified all of the parameters have the correct value and I was able to recreate a working API usage in a brand new project without prior packages installed. This leads me to think it is the version of RestSharp that is giving me this issue.Based on research about others having this issue it was an issue of the library change within updates.
Is there a specific version that is required as the dependancies for Docusign Package in visual studio doesn't mention a Restsharp version requirement?
Thank you in advance.

Related

Creating a main account twilio client on a subaccount node function

I'm developing a twilio function on a subaccount that needs to acces a twilio client on the main account. The function is being deployed through a Github action to the subaccount.
For this, on the subaccount function I have:
const mainClient = new twilio(context.MAIN_TWILIO_ACCOUNT_SID, context.MAIN_TWILIO_AUTH_TOKEN);
Then I need to access serverless.services but I'm getting serverless undefined therefore can't access services.
i.e.
return mainClient.serverless.services(...
I tested code locally and it worked but failed on deployment. Is it possible to access services on main account from a subaccount function??
Thanks.
For anyone experiencing a similar issue.
My problem was that deploying without being explicit about dependencies doesnt install the latests version of dependencies.
Deploy through github installed twilio node sdk version 3.29.0 but this version doesn includes serverless api yet. So I explicitly added latest twilio node sdk (3.75.0 at the moment) and that fixed the problem.
Thanks.

sass/node-sass issues downloading v4.10.0 from github api

Am trying to use the github api to download the node-sass dependency v4.10.0
Using the github api i am able to get the latest release v4.11.0 by using latest as the release name, however the tag v4.10.0 or any other tag is not working with api calls to single release download. How to fix this.
Below works
https://api.github.com/repos/sass/node-sass/releases/latest
Below doesn't where v4.10.0 is a valid release tag
https://api.github.com/repos/sass/node-sass/releases/v4.10.0
Error
{
"message": "Not Found",
"documentation_url": "https://developer.github.com/v3/repos/releases/#get-a-single-release"
}
I found the answer thought I would post here so it would be useful to others, according to the documentation we can use tags to get individual versions
The below worked for me
https://api.github.com/repos/sass/node-sass/releases/tags/v4.10.0
Use this API and download URL we should be able to fetch all the dependencies if have issues with proxy or access gyp for node sass.

Facebook Graph API version not supported

I want to access a facebook page data, and my fb Graph API version is 3.1, when i am writting this(in python):
graph = facebook.GraphAPI(access_token=token, version = 3.1)
it gives a version error, i.e:
facebook.GraphAPIError: Valid API versions are '2.7', '2.8', '2.9', '2.10', '2.11', '2.12', '3.0'
how can i access facebook Graph API through my version in python.
Thanks in advance.
You will either
have to use an app id that still allows you to use a lower API version, or
wait for an update of the library, or
see where the library does this check and manually add 3.1 to the list there.
If you are using this library https://github.com/mobolic/facebook-sdk/, you can edit the __init__.py file, which currently contains the following line:
VALID_API_VERSIONS = ["2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "3.0"]
If you add "3.1" to that list, you should be able to use API version 3.1 without getting this error.

Is it possible to use dialogflow-nodejs-client-v2 in front-end (Angular)?

I built an app a long time ago using Firebase and dialogflow-javascript-client.
Now, dialogflow-javascript-client is deprecated. Since dialogflow-nodejs-client-v2 is a node.js client, it is not supposed to run on Angular. Did they drop the javascript support? I can't get any answer from the devs, they just seem to avoid it.
If it is not possible, my only solution is to drop support of Dialogflow in my app.
There is absolutely not documentation or info for users migrating from Javascript, here is the only thing they give you:
Off course I tried to run it anyway, thinking it was also built to run on javascript...
But here is what I get:
WARNING in
./node_modules/google-gax/node_modules/grpc/node_modules/node-pre-gyp/lib/util/versioning.js
17:20-67 Critical dependency: the request of a dependency is an
expression
WARNING in
./node_modules/google-gax/node_modules/grpc/node_modules/node-pre-gyp/lib/pre-binding.js
20:22-48 Critical dependency: the request of a dependency is an
expression
WARNING in
./node_modules/google-gax/node_modules/grpc/src/grpc_extension.js
32:12-33 Critical dependency: the request of a dependency is an
expression
WARNING in
./node_modules/google-gax/node_modules/grpc/node_modules/minimatch/minimatch.js
Module not found: Error: Can't resolve 'path' in
'D:\ng\ww-app\node_modules\google-gax\node_modules\grpc\node_modules\minimatch'
WARNING in ./node_modules/minimatch/minimatch.js Module not found:
Error: Can't resolve 'path' in 'D:\ng\ww-app\node_modules\minimatch'
ERROR in ./node_modules/dialogflow/src/v2/agents_client.js Module not
found: Error: Can't resolve './agents_client_config' in
'D:\ng\ww-app\node_modules\dialogflow\src\v2'
.... (many more following)
The dialogflow-nodejs-client-v2 only supports a node.js environment. To update your agent to V2, you should create a Cloud Function for Firebase that sends requests to dialogflow-nodejs-client-v2, then call that Cloud Function from your Angular code rather than calling the API directly.
There is a major benefit of this approach: you will no longer have your API credentials exposed on the client side, which is a security risk.
I read a tutorial once with Node.js, maybe you can migrate your data from angular to Node.js like in this question anwered before.
I found another solution:
I've created a javascript client... and I get token from nodejs api getToken endpoint when it expires (that is every hour)... I have restricted the getToken endpoint to the same domain.

NemakiWare "CMIS Exception: permissionDenied"

I'm trying to create new CMIS type using Workbench and always get the message:
"CMIS Exception: permissionDenied".
Does anybody has experience with NemakiWare how to solve this problem?
Thank you in advance.
I was getting this misleading message using a different CMIS-compliant repository (Alfresco) when referencing a deprecated link structure for the CMIS endpoint.
i.e., older versions of Alfresco provide an AtomPub endpoint like this:
http://cms.mysite.com/alfresco/cmisatom
Newer versions implement this structure:
http://cms.mysite.com/alfresco/api/-default-/public/cmis/versions/1.0/atom
If I attempted to access the former link, I'd get an "access denied" message. Make sure your endpoint fits the structure appropriate to the version of NemakiWare you're running.

Resources