GithubHelp home page GithubHelp logo

Comments (13)

cmpaul avatar cmpaul commented on August 26, 2024

Hi @armyofda12mnkeys ,

I've just added this to the latest release, v3.5.1.

Can you try this out and let me know if this works for you?

Thanks!

from hellosign-java-sdk.

armyofda12mnkeys avatar armyofda12mnkeys commented on August 26, 2024

I'll try it out tomorrow. I'll let you know, Thanks for quick turnaround!

from hellosign-java-sdk.

armyofda12mnkeys avatar armyofda12mnkeys commented on August 26, 2024

Hey Chris,
Quick question. the current way I create an embedded HelloSign is:

           HelloSignClient client = new HelloSignClient(api_key);
           SignatureRequest newRequest = (SignatureRequest)client.createEmbeddedRequest(embedReq);

            List<Signature> signatures = newRequest.getSignatures ();
            Signature patient_signature = signatures.get (0);
            String signature_id = patient_signature.getId ();

            EmbeddedResponse response = client.getEmbeddedSignUrl(signature_id);
            esign_url = response.getSignUrl();

To get the White Labeling in my embedded links, do I have to use this ApiApp class?
if so, would it look something like:

           HelloSignClient client = new HelloSignClient(api_key);
//START of new ApiApp code
            ApiApp api_app = new ApiApp();
            api_app.setPrimaryButtonColor ("#FF0000");
            client.createApiApp (api_app);
//END of new ApiApp code
           SignatureRequest newRequest = (SignatureRequest)client.createEmbeddedRequest(embedReq);

            List<Signature> signatures = newRequest.getSignatures ();
            Signature patient_signature = signatures.get (0);
            String signature_id = patient_signature.getId ();

            EmbeddedResponse response = client.getEmbeddedSignUrl(signature_id);
            esign_url = response.getSignUrl();

from hellosign-java-sdk.

armyofda12mnkeys avatar armyofda12mnkeys commented on August 26, 2024

Note: getting an error with above modification where i add ApiApp:
"com.hellosign.sdk.HelloSignException: Must specify name"

from hellosign-java-sdk.

armyofda12mnkeys avatar armyofda12mnkeys commented on August 26, 2024

Also tried the below (adding a name... then domain since it errored asking for a domain... Im testing on localhost via localhost:9005 so not sure what to put there... said localhost was an invalid domain so changed to the url where I would deploy it if it passes my localhost testing).
Get this error now:
com.hellosign.sdk.HelloSignException: An app with the same name already exists
Any idea?

           HelloSignClient client = new HelloSignClient(api_key);
            ApiApp api_app = new ApiApp();
            api_app.setName ("Client Questionnaire App");
            api_app.setLinkColor ("#FF0000");
            //api_app.setWhiteLabelingOptions (options);
            api_app.setPrimaryButtonColor ("#FF0000");
            api_app.setDomain("wpengine.com");
            client.createApiApp (api_app);
            SignatureRequest newRequest = (SignatureRequest)client.createEmbeddedRequest(embedReq);

from hellosign-java-sdk.

cmpaul avatar cmpaul commented on August 26, 2024

Hi @armyofda12mnkeys - looks like you're doing this correctly to create a new API App, however sounds like you already have one with that name, so you'll want to update your app instead using the client.updateApiApp(app) method.

Once you've updated your API app with these white labeling settings, ALL signature requests created with the app's client ID will display using those settings.

If you want to test just one-off white labeling settings, you can do that by passing one-time white labeling options as a parameter in your JavaScript call, HelloSign.open():

HelloSign.open({
    ...
    'whiteLabelingOptions': {
        'link_color': '#FF0000'
    },
    ...
});

(This is not very well documented, but you can see how we use this parameter in our front-end JavaScript library here: https://github.com/HelloFax/hellosign-embedded/blob/master/src/embedded.js#L327).

Try these approaches and let us know if that works!

from hellosign-java-sdk.

armyofda12mnkeys avatar armyofda12mnkeys commented on August 26, 2024

Hey @cmpaul
so i tried one-off via whiteLabelingOptions (the JS front-end code) with my old server-side code (no new ApiApp code) and didnt work.
I tried adding updateApiApp too via below to my server-side code (and i used the name of the App I see online at https://www.hellosign.com/home/myAccount?current_tab=api)...
But still get an error:
com.hellosign.sdk.HelloSignException: Cannot update an ApiApp without a client ID. Create one first!

            EmbeddedRequest embedReq = new EmbeddedRequest(client_id, request);
            HelloSignClient client = new HelloSignClient(api_key);

            ApiApp api_app = new ApiApp();
            api_app.setName ("ClientQuestionnaireApp");
            api_app.setLinkColor ("#FF0000");
            api_app.setPrimaryButtonColor ("#FF0000");
            //api_app.setWhiteLabelingOptions (options);
            api_app.setDomain("wpengine.com");
            client.updateApiApp (api_app);

            SignatureRequest newRequest = (SignatureRequest)client.createEmbeddedRequest(embedReq);

from hellosign-java-sdk.

cmpaul avatar cmpaul commented on August 26, 2024

@armyofda12mnkeys I'm going to remove your last comment just to prevent any sensitive data being posted here. Because of your comment, I spotted a bug in our embedded.js code, which I've resolved. Turns out we don't handle submitting more than one whiteLabelingOption at a time. It will need review from my team so it will likely be fixed early next week but you can track it here: hellosign/hellosign-embedded#16.

In the meantime, in order to update an existing app, use the HelloSignClient.getApiApp(String clientId) function to first retrieve the ApiApp, then update the white labeling settings on it, and finally submit the updated app via HelloSignClient.updateApiApp(ApiApp app).

from hellosign-java-sdk.

armyofda12mnkeys avatar armyofda12mnkeys commented on August 26, 2024

Hey @cmpaul ,
i'll relook at the client-side whiteLabelingOptions in a few weeks when that fix is in...
For the server-side options, Im getting the error:
"com.hellosign.sdk.HelloSignException: An app with the same name already exists"
Im just getting the 'current app' and updating it i think as you suggested but not sure why its erroring:
Any ideas?

            EmbeddedRequest embedReq = new EmbeddedRequest(client_id, request);
            HelloSignClient client = new HelloSignClient(api_key);

            ApiApp api_app = client.getApiApp(client_id);
            api_app.setLinkColor ("#FF0000");
            api_app.setPrimaryButtonColor ("#00FF00");
            client.updateApiApp (api_app);

            SignatureRequest newRequest = (SignatureRequest)client.createEmbeddedRequest(embedReq);

from hellosign-java-sdk.

cmpaul avatar cmpaul commented on August 26, 2024

@armyofda12mnkeys That definitely sounds suspicious. Let me test it out on my end and get back to you.

from hellosign-java-sdk.

cmpaul avatar cmpaul commented on August 26, 2024

@armyofda12mnkeys Thanks to your feedback, I spotted a bug in our PUT request for updating an ApiApp. Just patched this as part of the 3.5.2 release. Give that a shot and let me know how that works!

from hellosign-java-sdk.

armyofda12mnkeys avatar armyofda12mnkeys commented on August 26, 2024

Hey @cmpaul , I tested and it looks good (just had to fix the invalid_contrast_ratio errors as I was initially testing with some goofy random/bright colors :) ). Thanks again!

Note: just tested server-side white-labeling, will test client-side overrides in the new release with the fix you put in.

from hellosign-java-sdk.

cmpaul avatar cmpaul commented on August 26, 2024

@armyofda12mnkeys Awesome 😺

from hellosign-java-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.