Hi, Is there anyone using Adobe Sign API, in conju...
# cfml-general
s
Hi, Is there anyone using Adobe Sign API, in conjunction with CFML? I freely admit I am a novice where API's are concerned, and working with CFHTTP If I copy and paste this URL, I get correct functionality (I think):
Copy code
<https://secure.au1.adobesign.com/public/oauth/v2?redirect_uri=https://localhost/testsign/redirect.cfm&response_type=code&client_id=myclient> id goes here&scope=user_login:self+agreement_write:account&state=S6YQD7KDA556DIV6NAU4ELTGSIV26ZNMXDSF7WIEEP0ZLQCLDQ89OYG78C3K9SROC8DXCGRVSGKU1IT1
but when I attempt to call the command with CFHTTP it never really works:
Copy code
<cfhttp result="result" method="post" charset="utf-8" url="<https://secure.au1.adobesign.com/public/oauth/v2>">
	  <cfhttpparam
		type="FORMFIELD"
		name="response_type"
		value='code'
	  />
	  <cfhttpparam
		type="FORMFIELD"
		name="client_id"
		value='myclient id goes here'
	  />
	  <cfhttpparam
		type="FORMFIELD"
		name="redirect_uri"
		value="<https://localhost/testsign/redirect.cfm>"
	  />
	  <cfhttpparam
		type="FORMFIELD"
		name="scope"
		value='user_login:self+agreement_write:account'
	  />
	  <cfhttpparam
		type="FORMFIELD"
		name="state"
		value='S6YQD7KDA556DIV6NAU4ELTGSIV26ZNMXDSF7WIEEP0ZLQCLDQ89OYG78C3K9SROC8DXCGRVSGKU1IT1'
	  />        
</cfhttp>
When I dump cfhttp.FileContent it contains HTML basically saying Invalid_request Hopefully I am doing something obviously incorrect that someone can point out easily? Or better yet a working example! Thanks,
b
Could it be the 'redirect_uri' needs to be publicly accessible?
s
I did wonder at that, but it's working when the url is manually created and plugged into a browser. I did wonder if it needs to be publicly assessable, but how would you test it if this was the case? I'll probably never have access to the other side of the firewall so to speak, so I really hope it's not the case!
t
you working request is a GET with url params perhaps you should try and repliacte that first rather than a post with form fields
m
@raymondcamden can you give a hand here?
r
im a little confused here - you are trying to do an oauth flow via a cfhttp call?
j
Perhaps adding in a tag to let it know the content type? Like <cfhttpparam type="header" name="Content-Type" value="application/x-www-form-urlencoded">
m
@mithlond may be an opportunity for collaboration here?
s
Hi, I swapped to using an adobe sign integration key, rather than oauth, and am finding it more straightforward to use. I've managed to upload a document for signing ( a transient document ) And send it for signing ( an agreement )