Reputation: 1287
I am currently able to generate a token from Docusign's API.
I am using the python wrapper docusign-esign
.
{
'access_token': <JWT token>,
'data': None,
'expires_in': '3600',
'refresh_token': None,
'scope': None,
'token_type': 'Bearer'
}
For Developers: API and Integration Key Information
Using
BASE_URL='https://demo.docusign.net/restapi'
OAUTH_BASE_URL='account-d.docusign.com'
I was using the envelope API to get envelope status with auth header as
'Authorization Bearer <JWT token>'
I get the following 400 error:
{
"errorCode": "PARTNER_AUTHENTICATION_FAILED",
"message": "The specified Integrator Key was not found or is disabled. Invalid account specified for user."
}
Upvotes: 1
Views: 259
Reputation: 1287
The public ID, integrator key, API Account ID and API Username are all separate IDs and are used at a different moment when making API calls. This has caused me a huge amount of frustration when dealing with the API.
To help clarify (this is specific to python's wrapper for Docusign):
when using request_jwt_user_token
it requires
client_id
-- integrator keyuser_id
-- ID you want to impersonate, which can be found in the admin page > users > API Username (which is a UUID)oauth_host_name
-- account-d.docusign.com
for dev or account.docusign.com
for productionprivate_key_bytes
-- the RSA Keypairs in the file (private key)scopes
-- typically signature impersonate
for JWT implicit grantthen when using the EnvelopeAPI.create_envelope
it required an account_id
, which was not the client_id
nor user_id
. The account_id
for me was the API Account ID for in For Developers: API and Integration Key Information. So either copy and paste the API Account ID from docusign or get it using the JWT grant example here
This was probably totally my fault for not understanding it, but hopefully, this is some info that can help someone else.
Upvotes: 3
Reputation: 14015
do you actually replace with a JWT token? and how did you generate this token? Please make sure you read and follow the instructions here - https://github.com/docusign/eg-01-python-jwt
Upvotes: 1