php - Sending an envelope: getting 301 response code back
Get the solution ↓↓↓PHP 7.4, Windows Server 2012, IIS8
I'm using the DocuSign PHP SDK method createEnvelope, which sends the envelope object to their server. The URL is
https://demo.docusign.net/restapi/v2.1/accounts/cheese-burger/envelopes
with these headers
X-DocuSign-SDK: PHP
Authorization: Bearer ee-i-ee-i-oh
Accept: application/json
Content-Type: application/json
I'm successfully using the JWT key for, say, getUserInfo, but when I submit the envelope I get
HTTP/1.0 301 Moved Permanently
back. As far as I can tell, the envelope is created correctly, I know the JWT key works, and account id is correct. Any insight as to why I'm getting a 301 redirect?
Answer
Solution:
@matt clark supplied the answer in the comments--the 301 response header helped the OP realize that he was missing the protocol section of the URL.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: illegal string offset
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.