Reputation: 27
I am trying to add users using the docuSign walkthrough and I get the following error:
{
"newUsers": [
{
"email": "[email protected]",
"userName": "[email protected]",
"errorDetails": {
"errorCode": "INVALID_PASSWORD_CHALLENGE",
"message": "Invalid forgotten password challenge."
}
}
]
}
And the request body is:
{
"newUsers": [
{
"userSettings": [
{
"value": "false",
"name": "allowSendOnBehalfOf"
}
],
"suffixName": "jr",
"lastName": "test",
"middleName": "test",
"firstName": "test",
"title": "test",
"password": "Lagzzzz1234444",
"userName": "[email protected]",
"email": "[email protected]"
}
]
}
So, What am I doing wrong?
I get the same error when using my own WEb API program by the way.
Upvotes: 0
Views: 732
Reputation: 1
you can ask DocuSign support to Active "Silent Activation". Then when you Active Users via API, then have automaticly Status Active and they don't have to Activate their Accounts via URL in Email.
Michal
Upvotes: 0
Reputation: 13500
As Andrew mentioned in his comment above, the error is occurring because your "Create User" request body is missing required information for forgottenPasswordInfo -- AND your DocuSign account settings currently specify that all new users must have at least 1 (or more) password reminder question/answer pairs.
If you add the forgottenPasswordInfo property to your request (as shown in the following example request -- except provide your own custom values for each question and answer), the user should be successfully created.
POST https://demo.docusign.net/restapi/v2/accounts/201105/users
{
"newUsers": [
{
"lastName": "HollisterTest",
"firstName": "Johnny",
"password": "johnnyspassword",
"userName": "[email protected]",
"email": "[email protected]",
"forgottenPasswordInfo": {
"forgottenPasswordQuestion1": "This is question_1?",
"forgottenPasswordAnswer1": "answer_1",
"forgottenPasswordQuestion2": "This is question_2?",
"forgottenPasswordAnswer2": "answer_2",
"forgottenPasswordQuestion3": "This is question_3?",
"forgottenPasswordAnswer3": "answer_3",
"forgottenPasswordQuestion4": "This is question_4?",
"forgottenPasswordAnswer4": "answer_4"
}
}
]
}
If you do not want to have to supply the password reminder question/answer information in your "Create User" API call, you could alternatively change your DocuSign account settings such that NO password reminder questions are required for new users. Navigate to Preferences >> Features >> Password Strength (link), change the Password Strength dropdown to "Custom" and Password Questions Required to "0" (and specify other settings as you see fit):
Note: I assume that when you say this API call doesn't work in the "DocuSign walkthrough", you're referring to IODocs. I've confirmed that there's an issue with IODocs, in that the "Create User" API call won't work unless the request body contains the forgottenPasswordInfo property (if DocuSign account settings require reminder Q&A) -- but IODocs doesn't expose this property in the user interface for the user to set it. Although IODocs is a neat tool and serves as a good starting point for exploring the DocuSign REST API, it's not always 100% complete/correct for the exact situation you want to test. Instead of relying on IODocs, it's a good idea to get accustomed to reading the DocuSign REST API guide in conjunction with the REST API help page, and to leverage a tool like Postman (in the Chrome browser) to construct and test your API calls.
Upvotes: 2