I am using flameSDK to interact with my marketing cloud org. I am able to create the ETClient object. During creation, it successfully calls the auth endpoint so I get my accessToken, expiresIn, legacyToken and refreshToken. With this created ETClient object, I can make calls to my marketing cloud org and retrieve the records in the data extension.

So all works good until an hour passess. The app crashes (i.e. throws an ETSdkException). I looked through the logs and turns out that I receive a null refreshtoken and a legacytoken when it initially calls the auth endpoint and because I get back an expiresIn field with the value of 3479 (i.e. almost 58 minutes), it crashes when it does a check to see if the refreshToken is null (ETClient.java. line 342). I'm not sure why I initially get a null refreshToken from the auth endpoint.

Any suggestions? What I'm thinking of doing is pretty much call requestToken() in that if statement and delete the exception.. not sure what complications arises due to that..

I'm creating an ETClient bean in Spring class annotated:

public ETClient createETClient() {
    try {

    ETConfiguration configuration = new ETConfiguration();
    configuration.set("clientId", marketingCloudConfigurationProperties.getClientId());
    configuration.set("clientSecret", marketingCloudConfigurationProperties.getClientSecret());

    ETProxy proxy = new ETProxy(

    return new ETClient(configuration, proxy);
    } catch (ETSdkException e) {
        log.error("Could not instantiate ETClient bean.", e);
        return null;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.