cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We just wanted to say thank you! Check out our customer appreciation video here.

Dropbox Sign API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error during send signature request - Email not valid

Error during send signature request - Email not valid

Stefano Massera
Explorer | Level 3

I'm trying to send a signature request via Java client 

this is my code (written in Kotlin) :

class DropBoxSigner {
companion object {
private val apiClient = Configuration.getDefaultApiClient()
.setPassword("api token")
}

fun sign() {
val signatureRequestApi = SignatureRequestApi(apiClient)

val signer1 = SubSignatureRequestSigner()
.emailAddress("test.user1@dove.it")
.name("Test User1")
.order(0)

val signer2 = SubSignatureRequestSigner()
.emailAddress("test.user1@dove.it")
.name("Test User2")
.order(1)

val signingOptions = SubSigningOptions()
.draw(true)
.type(true)
.upload(true)
.phone(true)
.defaultType(DRAW)


val data = SignatureRequestSendRequest()
.title("a title")
.subject("Request subject")
.message("Request message")
.signers(listOf(signer1, signer2))
.addFilesItem(File("./dropbox-sign.pdf"))
.signingOptions(signingOptions)
.testMode(true)

try {
val result = signatureRequestApi.signatureRequestSend(data)
println(result)
} catch (e: ApiException) {
System.err.println("Exception when calling SignatureRequestSendRequest")
System.err.println("Status code: " + e.code)
System.err.println("Reason: " + e.responseBody)
System.err.println("Response headers: " + e.responseHeaders)
e.printStackTrace()
}
}
}

 

Code runs but this error is returned:

Exception when calling SignatureRequestSendRequest
Status code: 400
Reason: class ErrorResponse {
error: class ErrorResponseError {
errorMsg: Invalid email
errorName: bad_request
errorPath: null
}
}
Response headers: {Server=[Apache], Access-Control-Allow-Origin=[*], Access-Control-Allow-Methods=[GET, POST, OPTIONS, PUT, DELETE], User-Agent=[HelloSign API], Connection=[keep-alive], P3P=[CP="NOP3PPOLICY"], Access-Control-Allow-Headers=[Authorization, Origin, X-Requested-With, Content-Type, Accept, Request-URL, Referrer-Policy, Referer, Sec-CH-UA, Sec-CH-UA-Mobile, Sec-CH-UA-Platform, Sec-Fetch-Site, User-Agent, X-User-Agent], Date=[Tue, 12 Dec 2023 11:04:41 GMT], Strict-Transport-Security=[max-age=31536000], Vary=[Origin], Set-Cookie=[AWSALBCORS=Cl7ucvVmKGS9HdGnc+aly50OW37r7KwAYfYZAxMPfny5vzI0QrEV40pcbRrPkClxABELt5uFkurQEoSCI/3qqliESOtOn5BymbD0MI4bRhEujK0anS1QRSNb6A+6; Expires=Tue, 19 Dec 2023 11:04:41 GMT; Path=/; SameSite=None; Secure, AWSALB=Cl7ucvVmKGS9HdGnc+aly50OW37r7KwAYfYZAxMPfny5vzI0QrEV40pcbRrPkClxABELt5uFkurQEoSCI/3qqliESOtOn5BymbD0MI4bRhEujK0anS1QRSNb6A+6; Expires=Tue, 19 Dec 2023 11:04:41 GMT; Path=/], Content-Length=[66], Content-Type=[application/json]}
com.dropbox.sign.ApiException: class ErrorResponse {
error: class ErrorResponseError {
errorMsg: Invalid email
errorName: bad_request
errorPath: null
}
}
at com.dropbox.sign.ApiClient.invokeAPI(ApiClient.java:1095)
at com.dropbox.sign.api.SignatureRequestApi.signatureRequestSendWithHttpInfo(SignatureRequestApi.java:1238)
at com.dropbox.sign.api.SignatureRequestApi.signatureRequestSend(SignatureRequestApi.java:1181)
at DropBoxSigner.sign(DropBoxSigner.kt:52)

Can you please help me to understand which mail is invalid?
The two provided in the example are place holders but i can guarantee that the one I've used are valid emails with no blank space around

 

thanks

1 Reply 1

DB-Des
Dropbox Engineer

Hi there,

 

Please submit a support request from the email you are using to make API requests, along with the code snippet you just provided, so we can further assist you in determining why that error is being thrown.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    DB-Des Dropbox Engineer
What do Dropbox user levels mean?