Comments (1)
Hi there,
Looks like you're not setting your account_id in the configure block which is breaking the request.
If you want to do it dynamically, you'd have to do it like this:
require 'bundler'
Bundler.require
DocusignRest.configure do |config|
config.username = '[email protected]'
config.password = '********'
config.integrator_key = 'RFXX-5e8080a0-88d3-4c41-94b6-**********'
config.endpoint = 'https://demo.docusign.net/restapi'
config.api_version = 'v2'
end
acct_client = DocusignRest::Client.new
puts acct_client.get_account_id
DocusignRest.configure do |config|
config.account_id = acct_client.get_account_id
end
client = DocusignRest::Client.new
response = client.create_envelope_from_document(
email: {
subject: 'Sign me please',
body: 'This is the email body from docusign.'
},
# If embedded is set to true in the signers array below, emails don't go out
# and you can embed the signature page in an iFrame by using the
# get_recipient_view method
signers: [
{
embedded: true,
name: 'Test Guy',
email: '[email protected]',
role_name: 'Issuer',
sign_here_tabs: [
{
anchor_string: 'sign_here_1',
anchor_x_offset: '140',
anchor_y_offset: '8'
}
]
},
],
files: [
{ path: '/Users/mhawash/src/rpace/sandbox/docu_sign/test.pdf', name: 'test.pdf' },
],
status: 'sent'
)
puts response
I tested this locally with my credentials and the test.pdf file from this repo and it worked.
However, personally I just embed the account_id directly in the first configure block. The query to get the account ID I believe is just to allow you to retrieve it initially. Of course, you can do it dynamically as I show above if you really want to...
from docusign_rest.
Related Issues (20)
- Version Needs Bumped HOT 1
- INVALID_ANCHOR_TAB_STRING on example HOT 2
- Regarding your note HOT 1
- Composite template method errors HOT 2
- Gem Version HOT 2
- Sending value to custom field HOT 3
- baseUrl HOT 5
- Roadmap
- Adding an attachment to an envelope HOT 6
- INVALID_CONTENT_TYPE with create_envelope_from_document HOT 2
- Embedded signing and also send the Envelope to signers email HOT 2
- Typo when checking presence of :wet_sign option HOT 2
- Can we enable :require_sign_on_paper option from create_envelope_from_document? HOT 1
- No recipients HOT 2
- Carbon Copy Recipients in Composite Templates HOT 2
- Inline Signers in Composite Template HOT 1
- Missing README documentation for signer -> `:routing_order`
- event notification status HOT 2
- Custom fields per signer not showing up in document
- Trying to add expiration and reminder details for an envelope but the gem is not considering them, is there any way to add expirations and reminder details while creating an envelope?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docusign_rest.