Android / DocuSign REST API / Gets the initials image for a user.
Back to Collection Items
// Important: Don't forget to include the call to System.loadLibrary
// as shown at the bottom of this code sample.
package com.test;
import android.app.Activity;
import com.chilkatsoft.*;
import android.widget.TextView;
import android.os.Bundle;
public class SimpleActivity extends Activity {
private static final String TAG = "Chilkat";
// Called when the activity is first created.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkHttp http = new CkHttp();
boolean success;
CkJsonObject queryParams = new CkJsonObject();
queryParams.UpdateString("include_chrome","{{include_chrome}}");
// Adds the "Authorization: Bearer {{accessToken}}" header.
http.put_AuthToken("{{accessToken}}");
http.SetRequestHeader("Accept","image/gif");
CkHttpResponse resp = http.QuickRequestParams("GET","https://domain.com/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}/recipients/{{recipientId}}/initials_image",queryParams);
if (http.get_LastMethodSuccess() == false) {
Log.i(TAG, http.lastErrorText());
return;
}
Log.i(TAG, String.valueOf(resp.get_StatusCode()));
Log.i(TAG, resp.bodyStr());
}
static {
System.loadLibrary("chilkat");
// Note: If the incorrect library name is passed to System.loadLibrary,
// then you will see the following error message at application startup:
//"The application <your-application-name> has stopped unexpectedly. Please try again."
}
}
Curl Command
curl -G -d "include_chrome=%7B%7Binclude_chrome%7D%7D"
-H "Accept: image/gif"
-H "Authorization: Bearer {{accessToken}}"
https://domain.com/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}/recipients/{{recipientId}}/initials_image
Postman Collection Item JSON
{
"name": "Gets the initials image for a user.",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "image/gif"
},
{
"key": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"url": {
"raw": "{{baseUrl}}/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}/recipients/{{recipientId}}/initials_image?include_chrome={{include_chrome}}",
"host": [
"{{baseUrl}}"
],
"path": [
"v2.1",
"accounts",
"{{accountId}}",
"envelopes",
"{{envelopeId}}",
"recipients",
"{{recipientId}}",
"initials_image"
],
"query": [
{
"key": "include_chrome",
"value": "{{include_chrome}}"
}
],
"variable": [
{
"key": "accountId",
"value": "{{accountId}}"
},
{
"key": "envelopeId",
"value": "{{envelopeId}}"
},
{
"key": "recipientId",
"value": "{{recipientId}}"
}
]
},
"description": "Retrieves the initials image for the specified user. The image is returned in the same format as it was uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image.\n\nThe userId specified in the endpoint must match the authenticated user's user id and the user must be a member of the account.\n\nThe `signatureIdOrName` paramter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. \n\nFor example: \"Bob Smith\" to \"Bob%20Smith\"\n\nOlder envelopes might only contain chromed images. If getting the non-chromed image fails, try getting the chromed image."
},
"response": [
]
}