简体   繁体   English

从实时环境调用 Docusign API 时的 INVALID_USERID

[英]INVALID_USERID when calling Docusign API from live environment

I am getting below error when calling Docusign API from a C# web api.从 C# web Z8A5DA52ED126447135AZE70C8A05 调用 Docusign API 时出现以下错误。 Able to get the access token but when creating the envelope this error is being received.能够获取访问令牌,但在创建信封时收到此错误。

Is there any issue with clientUserId because it worked without any hiccups in sandbox. clientUserId是否有任何问题,因为它在沙盒中没有任何问题。 What value do I need to pass in it?我需要传递什么值? From all the sources, I gather it just indicates that this request is an embedded one.从所有来源来看,我认为它只是表明这个请求是一个嵌入式请求。 If we have to pass a specific userId in this field how to get it when passing it for envelope creation.如果我们必须在此字段中传递特定的userId ,在传递它以创建信封时如何获取它。

Response:回复:

{
    "errorCode": "INVALID_USERID",
    "message": "Invalid UserId."
}

Below is the request which we are passing以下是我们正在传递的请求

{
    "documents": [
        {
            "documentId": "1",
            "fileExtension": "pdf",
            "name": "Trial - OL.pdf"
        }
    ],
    "emailSubject": "Docusign Digital Signature",
    "recipients": {
        "signers": [
            {
                "clientUserId": "1001",
                "email": "XXXX",
                "name": "XXXX",
                "recipientId": "1",
                "routingOrder": "1",
                "tabs": {
                    "signHereTabs": [
                        {
                            "anchorIgnoreIfNotPresent": "false",
                            "anchorString": "XXXX",
                            "anchorUnits": "inches",
                            "anchorXOffset": "0",
                            "anchorYOffset": "-0.25"
                        }
                    ]
                }
            }
        ]
    },
    "status": "sent"
}

There is no error while retreiving access token检索访问令牌时没有错误

The error is not about clientUser but about the userId of the user.该错误与 clientUser 无关,而与用户的 userId 有关。 After you finished Go-Live, the account is different, the user is different, and the URLs for the environments are all different when you migrate from the developer sandbox to the production environment.上线后,从开发者沙箱迁移到生产环境时,账号不一样,用户不一样,环境的URL也不一样。 If you got a token using JWT, remember that one of the things you used was the userId of the impersonated users.如果您使用 JWT 获得了令牌,请记住您使用的其中一件事是模拟用户的 userId。 You cannot use the token generator tokens in production.您不能在生产中使用令牌生成器令牌。 Production environment doesn't have a single URL like demo.docusign.net.生产环境没有像 demo.docusign.net 这样的单一 URL。 It can be many different URLs and you have to first figure out what it is before making API calls.它可以是许多不同的 URL,在进行 API 调用之前,您必须先弄清楚它是什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM