USER_LACKS_MEMBERSHIP Docusign Nodejs - docusignapi

I'm using the Docusign API with a nodejs server. I just recently promoted my sandbox integration key to production "live" and have updated my account ID, Client ID, etc so I hit the production account however, whenever I try to create an envelope, I get this error:
text: '{\r\n "errorCode": "USER_LACKS_MEMBERSHIP",\r\n "message": "The UserID does not have a valid membership in this Account."\r\n}',
I only have 1 user in the prod account so I'm not sure why this user would not have a valid membership. What's the best way to go about debugging this type of issue?

What I was missing here was that I wasn't setting the oauthpath correctly. I'm using the nodejs api and you should use apiClient.setOAuthBasePath() to set it.
If you don't set it, it will default to the demo url. Just in case this helps anyone else.

Related

Upgrade to the official environment and receive the following error "The client id provided is not registered with DocuSign"

I have applied the integrated key as a live key in the sandbox environment of docusign, and the status is: review passed,
However, I used the domain name of the official environment to obtain the authorization code. When logging into the official account, I received the following error: The client id provided is not registered with DocuSign
Does anyone know what I am missing?
enter image description here
Congrats on passing the review for the DocuSign eSignature API Go-Live process.
However, you still need to take one more step after that. Which is, you need to go to your developer sandbox (demo) env Admin, find your integration key and click "Review Status" where you see it passed, and then click "next" to log into the production (what you called "official" env to get that key activated in there. You would need to have a production account to proceed.
Important: You need administrator privileges to the production account to promote a key into it. If you do not have any valid account memberships, an error will be returned. Also note that certain account types, such as 30-day Free Trials and Freemium accounts, are not eligible for key promotion.

When creating a publisher via `vsce` I get a 401

I am running this command to create a VSCode publisher:
vsce create-publisher cprev
but I am getting this 401 error:
my shell showing the 401
I have a personal token created like so:
the azure devops console
anyone know why I am getting a 401? Is there some way to debug it, to get a more specific message?
One easy mistake to make when creating the PAT (Personal Access Token)
is to not select all accessible accounts in the Accounts field
drop-down (instead selecting a specific account). You should also set
the Authorized Scopes to All scopes for the publish to work。
Please set Organization in drop down list with All accessible organizations.
More details pleas take a look at this similar issue here: vsce create-publisher returns 401

API returning a USER_LACKS_MEMBERSHIP error

I've built an API-based integration with DocuSign (using their PHP SDK), and am now at the point of deploying to the production server. I have reconfigured everything with the production integration key, public/private key pair, user and account IDs, endpoint URL, etc. replacing the demo ones. The OAuth portion of the conversation is working fine, and I get a valid token back. When I then try to send an envelope, I hit a USER_LACKS_MEMBERSHIP error, and cannot figure out why. As far as I can see, everything about the API user is the same between the demo and production systems.
I've authorized the application and made sure that it's in the list of "Applications with Access to DocuSign".
I have enabled logging, but the only things that are showing up in there appear to be from my own navigation in the site, nothing related to the API calls at all.
Most of the documentation that I can find on this simply repeats the generic error text: "The UserID does not have a valid membership in this Account." If I go to the account admin and look at the list of users, the one I'm expecting is right there, with DS Admin permission; not sure what else might be done to give them "membership". One mentioned not using SendOnBehalfOf, but I'm not, so I can't really remove that.
All the code is identical, just configuration that's changed. Not sure where else to look. Anybody have any suggestions for what to try?
FURTHER INFORMATION
I've tried the getUserInfo call in the SDK, passing the same access token I use for the other call. It returns successfully, showing that it is for the user I'm expecting, in the one group we have, on the production server. And yet, when I enable logging again, as this same user, there is still zero record in the resulting logs of any of this API activity.
Attempts to do things like list templates with the SDK fail with the same USER_LACKS_MEMBERSHIP error.
Using the Diagnostics API (again, through the SDK) to check logging status shows that it is NOT enabled (despite my enabling it in the UI), but can be enabled with a separate call. Subsequently attempting to use listRequestLogs in the SDK generates a 404 error, though the URL matches what's listed in the API documentation (/v2/diagnostics/request_logs). Not sure whether these findings confirm that I'm somehow logging onto the API and the UI with different users (even though the user name and internal ID match), or that there's some problem with the logging facility in DocuSign.
The problem turns out to be the URL I was using for API calls. I switched from demo.docusign.net in testing to www.docusign.net in live, but being in Canada we need to use ca.docusign.net. For those who find this later, you can get the correct base path to use from the oauth/userinfo endpoint, or the getUserInfo() call through the SDK (PHP SDK, at least; don't know what the analogous call would be in others).
There are 3 things to consider:
API calls are made to an endpoint (URL) that contains the account # (either GUID or short form) in the url. Take a note of that number in the url.
Auth Token is a token for a specific user in a specific account.
UserId for the specific call. That is a specific user in the account.
If the user is not in the account, or there's a mismatch between #1 and #2 - you'll get this error. You must work with a single account and have it in all places as well as the user must be a member of this account.
Re:
I have enabled logging, but the only things that are showing up in there appear to be from my own navigation in the site, nothing related to the API calls at all.
Since the request logging is not showing your API activity, the problem is that the person you've logged in as on the web tool is not the same as the person (user id) that you've logged in as on your application.
Solution for OAuth Authorization Code authentication: double check that when your app is logging into DocuSign, you're using the account.docusign.com authentication server, not the account-d.docusign.com auth server. (Look at the URL in your browser during the login sequence.)
Solution for OAuth JWT authentication: re-check that the impersonated user id is from the production system and you're using the right authentication server

Invalid Login attempt while accessing Netsuite using RESTlet?

I am trying to get data from Netsuite using RESTlet. For that, i am using the following details in PHP:
Consumer Key
Consumer Secret
Script Id
Deploy Id
Access Token Id
Access Token Secret
At first time of using these details, i got that error is Invalid login attempt.
I found why it is coming , because of the following any one or all of the wrong details.
Consumer Key
Consumer Secret
Access Token Id
Access Token Secret
After giving correct details it works fine and i stored all these details in DB. I didn't change anything. But after few days i am getting the same error.
I want to know whether the access token will expire after some days or why the error is coming.
I recently had similar issue, everything worked on my machine, but fail with same exception on the test server. Carefully debugged and saw that timestamps for generating request access token are with 12 min difference.
After synching times everything went fine. So even token definitions in NetSuite doesn't expires, timestamps for generating request tokens must be in 'some' time-window with time in the NetSuite environment.
Too bad that SuiteAnswers (https://netsuite.custhelp.com/app/answers/detail/a_id/44241/kw/44241) doesn't mention anything about time.
If you are trying to access a RESTlet through Token Based Authentication (TBA) and are receiving the INVALID_LOGIN_ATTEMPT error and the login audit detail is permission_denied, then the following may work.
Ensure that the role:
Isn't an administrator type role
Doesn't have the Web Services Only Role checked
Also double check that your related integration has the TOKEN-BASED AUTHENTICATION checked.
Note: to check your audit trail detail, go to Setup > Users/Roles > View Login Audit Trail, check USE ADVANCED SEARCH, and be sure to add Detail as a result column.
In my case I was getting the account id from the URL which is lowercase, while it should be upper case.
I was testing on a sandbox and sb1 should be xxxxxx-SB1 on the URL and Realm should be xxxx_SB1
Finally I found the answer for 403 error in my case, I changed the time offset with my standard CST time zone, and repost, it worked.
If you found this 403 error and have been trying every ways, check the time on your machine
If you are using user credentials for RESTlet Authentication ensure that the role in use doesn't have the web services only Role checked.
It has to ensure the token (Token ID) matches the proper Application on the Netsuite side.
Setup -> Integration -> Manage Integrations

One or both of Username and Password are invalid

I have developed an integration using docusign SOAP API. We had the integration certified. It works great using the demo API URLs and my dev account. When I update the API URLs to production and use my live production account I get the return status of "One or both of Username and Password are invalid" when I call CreateEnvelope(). I have verified the user name and password are correct. I use them to log into the production account. I am setting the username in the code like [APIKEY]APIUSERNAME.
Does a DocuSign account need to be authorized to use an integration? How do I know my integrators key was moved over to production after certification? Any ideas when this works in dev but not in production.
Just wanted to follow up and post the answer to this issue. After working with Partner support I was able to get things working.
The issue was related to using the wrong base url when I created my api proxy. I was just passing in the docusign production url, when I actually needed to get this in the configuration for each user that uses the integration. When I get the base url in the config part of the app it return the actual server which the users account resided on (which includes the na1 or na2 etc server name in the url). After adding this to the config and using this new base url in my calls the app works as it should.
Yes I believe DocuSign production accounts need to be authorized to use the API. If you are positive that you are passing the correct username and password in your code then it's quite possible that this is an account issue.
For resolution I would suggest the following. For questions regarding your integration key and if it was indeed promoted to production following your successful certification you should contact
apicertifications#docusign.com
And if you have an account manager you might want to try reaching out to them as well, which might get your questions answered sooner.

Resources