Destination SDK Failing because of invalid Auth token(Authencation Failed) | Community
Skip to main content
Level 2
June 15, 2026
Question

Destination SDK Failing because of invalid Auth token(Authencation Failed)

  • June 15, 2026
  • 12 replies
  • 68 views

we are trying to create a destination sdk to swoogo faccing issue which authentication type to use had tried OAuth 2 with Client Credentials Grant it is not working please suggest what kind of customerauthentication to be used for these destination .
below for swoogo request api token for refernce :
https://swoogo.readme.io/reference/post_oauth2-token
Swoogo Api:
https://swoogo.readme.io/reference/updatecontact
these was used in our config json it was not working:

 "customerAuthenticationConfigurations": [

   {

      "authType": "OAUTH2",

      "grant": "OAUTH2_CLIENT_CREDENTIALS",

      "accessTokenUrl": "https://api.swoogo.com/api/v1/oauth2/token",

      "clientId": "XXXXX",

      "clientSecret": "XXXXXXXXXXXXXX",

      "options": {

        "useBasicAuth": true

      }

    }  

  ],

12 replies

DineshK
Level 2
June 17, 2026

Hi ​@Rrffgg
 

The issue is useBasicAuth: true — that's what's breaking it.

When you set that option, AEP encodes your credentials into an Authorization: Basic header. But Swoogo's token endpoint expects client_id and client_secret as form body parameters, not a Basic header. Drop that option and your config should work:

 

"customerAuthenticationConfigurations": [
{
"authType": "OAUTH2",
"grant": "OAUTH2_CLIENT_CREDENTIALS",
"accessTokenUrl": "https://api.swoogo.com/api/v1/oauth2/token",
"clientId": "{{customerData.clientId}}",
"clientSecret": "{{customerData.clientSecret}}"
}
]

Without useBasicAuth, the SDK sends the token request exactly how Swoogo expects it:

 

POST https://api.swoogo.com/api/v1/oauth2/token
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials&client_id=XXX&client_secret=XXX

Also noticed you have credentials hardcoded in the config — swap those out for {{customerData.clientId}} and {{customerData.clientSecret}} template references, and add matching fields to your customerDataFields block so users enter their own credentials when setting up the destination.

One more thing to check: some OAuth2 endpoints reject the token request if no scope is passed, even if it's marked optional in the docs. If you're still hitting failures after removing useBasicAuth, try adding a "scopes": [] field or whatever scope value Swoogo requires.

If it's still failing, share the actual error response from the token endpoint — "Authentication Failed" could also mean the credentials are wrong or the OAuth app on the Swoogo side isn't configured to allow client credentials flow.

RrffggAuthor
Level 2
June 17, 2026

Hi ​@DineshK ,
Thanks for Replying, still getting below error :

"httpCalls": [

                {

                    "errorMessage": "Encountered error while processing the message: Cannot get authentication token due to a non-retryable error"}]
these is config json used:
 

{

    "name": "test Swoogo Data Extension 1706",

    "description": "insert swwogo contacts when segment qualifies",

    "status": "TEST",

    "customerAuthenticationConfigurations": [

        {

            "authType": "OAUTH2",

            "grant": "OAUTH2_CLIENT_CREDENTIALS",

            "accessTokenUrl": "https://api.swoogo.com/api/v1/oauth2/token",

            "clientId": "l3u-Z2acsawo-4XjsIC2",

            "clientSecret": “XXXXX",--replaced here with actual code

            "scope": ["read", "write"]

        }

    ],

    "uiAttributes": {

        "connectionType": "Server-to-server",

        "category": "personalization",

        "monitoringSupported": true,

        "flowRunsSupported": true

    },

    "schemaConfig": {

        "profileFields": [

            {

                "name": "email",

                "title": "Email Address",

                "type": "string",

                "isRequired": true,

                "readOnly": false,

                "hidden": false

            },

            {

                "name": "first_name",

                "title": "First Name",

                "type": "string",

                "isRequired": false,

                "readOnly": false,

                "hidden": false

            },

            {

                "name": "last_name",

                "title": "Last Name",

                "type": "string",

                "isRequired": false,

                "readOnly": false,

                "hidden": false

            }

        ],

        "profileRequired": true,

        "segmentRequired": true,

        "identityRequired": true

    },

    "identityNamespaces": {

        "Email": {

            "acceptsAttributes": false,

            "acceptsCustomNamespaces": false,

            "acceptedGlobalNamespaces": {

                "Email": {}

            }

        }

    },

    "destinationDelivery": [

        {

            "authenticationRule": "CUSTOMER_AUTHENTICATION",

            "destinationServerId": "eeb5d3cc-aa80-4bc5-bde2-95dd54a7765b"

        }

    ],

    "aggregation": {

        "aggregationType": "BEST_EFFORT",

        "bestEffortAggregation": {

            "maxUsersPerRequest": 1,

            "splitUserById": true,

            "aggregationKey": {

                "includeIdentity": true,

                "oneIdentityPerGroup": true,

                "includeSegmentId": true,

                "includeSegmentStatus": true

            }

        }

    }

}

DineshK
Level 2
June 17, 2026

That error — Cannot get authentication token due to a non-retryable error — means Swoogo's token endpoint is actively rejecting the request, not timing out or having a network issue. So, the credentials themselves may be fine; it's the request format that's wrong.

Looking at your config, the issue is scope — Destination SDK expects scopes (plural). Using the wrong field name means it's either being ignored or causing a malformed token request. Change it to:

 

"customerAuthenticationConfigurations": [
{
"authType": "OAUTH2",
"grant": "OAUTH2_CLIENT_CREDENTIALS",
"accessTokenUrl": "https://api.swoogo.com/api/v1/oauth2/token",
"clientId": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET",
"scopes": []
}
]

Start with an empty scopes array — Swoogo may not require a scope value for client credentials at all, and passing ["read", "write"] could itself be causing the rejection if those aren't valid scope identifiers on their end.

Before anything else, validate the token request directly with cURL to rule out any Swoogo-side configuration issue:

 

curl -X POST https://api.swoogo.com/api/v1/oauth2/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=YOUR_ID&client_secret=YOUR_SECRET"

If that returns a token, your credentials are valid and the issue is purely in the SDK config. If it fails there too, the OAuth app on the Swoogo side isn't configured for client credentials flow — worth checking with their support or re-verifying the app settings in Swoogo.

RrffggAuthor
Level 2
June 17, 2026

these is how token is creating when select auth type basic auth it asking username and password giving client id and secret here  but if i select auth type inherit form parent it directly asking access token 
once token genrated using that to fetch other api  like these 



curl -X POST https://api.swoogo.com/api/v1/oauth2/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials&client_id=YOUR_ID&client_secret=YOUR_SECRET"
these request what auth type to select if we give client secret and id in body 

DineshK
Level 2
June 17, 2026

Your original config was actually on the right track — useBasicAuth: true is correct. Swoogo explicitly requires credentials to be Base64 encoded and sent as an Authorization: Basic header. That's exactly what useBasicAuth: true does.

The reason it was failing is the options wrapper. Destination SDK doesn't recognize options.useBasicAuth as a valid field — it needs to be at the top level:

 

"customerAuthenticationConfigurations": [
{
"authType": "OAUTH2",
"grant": "OAUTH2_CLIENT_CREDENTIALS",
"accessTokenUrl": "https://api.swoogo.com/api/v1/oauth2/token",
"clientId": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET",
"useBasicAuth": true,
"scopes": []
}
]

The two changes from your original:

  • Move useBasicAuth: true out of the options block and to the top level
  • Add "scopes": [] — empty array, Swoogo doesn't require a scope value but the field should be present

This matches exactly what Swoogo's docs require — Base64 encoded client_id:client_secret in the Authorization header with grant_type=client_credentials in the body, which is what useBasicAuth: true tells the SDK to construct automatically.

Give this a try and let me know if it works.

RrffggAuthor
Level 2
June 17, 2026

Hi ​@DineshK 
updated as per ur suggestion still getting same error 
 "errorMessage": "Encountered error while processing the message: Cannot get authentication token due to a non-retryable error"
Not sure what is issue .

RrffggAuthor
Level 2
June 17, 2026

below is server json used
 

{

    "name": "Dest swoogo Server 1006",

    "destinationServerType": "URL_BASED",

    "urlBasedDestination": {

        "url": {

            "templatingStrategy": "PEBBLE_V1",

            "value": "https://api.swoogo.com/api/v1/contacts/create"

        },

        "splitUserById": false

    },

    "httpTemplate": {

        "httpMethod": "POST",

        "contentType": "application/json",

        "requestBody": {

            "templatingStrategy": "PEBBLE_V1",

            "value": "{\n     {% for profile in input.profiles %}\n    {\n      \"first_name\": \"{{ profile.attributes.first_name }}\",\n      \"last_name\": \"{{ profile.attributes.last_name }}\",\n      \"email\": \"{{ profile.attributes.email }}\"\n    }{% if not loop.last %},{% endif %}\n    {% endfor %}\n  \n}"

        }

    }

}

DineshK
Level 2
June 17, 2026

Apologies for the back and forth on the options block — I should have caught this earlier. Your very first config had useBasicAuth: true inside options which is the correct placement, and I incorrectly told you to remove it. Swoogo's docs are explicit that credentials must be Base64 encoded in the Authorization header, and that's exactly what useBasicAuth: true does.

Can you try updating both configs together:

Auth Config:

 

"customerAuthenticationConfigurations": [
{
"authType": "OAUTH2",
"grant": "OAUTH2_CLIENT_CREDENTIALS",
"accessTokenUrl": "https://api.swoogo.com/api/v1/oauth2/token",
"clientId": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET",
"options": {
"useBasicAuth": true
},
"scopes": []
}
]

Server Template:

 

{
"name": "Dest swoogo Server 1006",
"destinationServerType": "URL_BASED",
"urlBasedDestination": {
"url": {
"templatingStrategy": "PEBBLE_V1",
"value": "https://api.swoogo.com/api/v1/contacts/create"
}
},
"httpTemplate": {
"httpMethod": "POST",
"contentType": "application/json",
"headers": [
{
"header": "Authorization",
"value": {
"templatingStrategy": "PEBBLE_V1",
"value": "Bearer {{authData.accessToken}}"
}
}
],
"requestBody": {
"templatingStrategy": "PEBBLE_V1",
"value": "{\n{% for profile in input.profiles %}\n{\n\"first_name\": \"{{ profile.attributes.first_name }}\",\n\"last_name\": \"{{ profile.attributes.last_name }}\",\n\"email\": \"{{ profile.attributes.email }}\"\n}{% if not loop.last %},{% endif %}\n{% endfor %}\n}"
}
}
}

{{authData.accessToken}} is the Destination SDK variable that carries the fetched OAuth token into each outgoing request — without that headers block it was being fetched but silently dropped. Apply both together and let me know how it goes.

RrffggAuthor
Level 2
June 18, 2026

Hi ​@DineshK 
still getting same error .Had raised adobe tic below is what they suggesting can u help what need to change or add to my config  and server json 
The current authentication type and grant should remain unchanged:
1. authType: OAUTH2
2. grant: OAUTH2_CLIENT_CREDENTIALS

However, the token request needs to be sent in the exact format expected by Swoogo.

What needs to change

Swoogo's token endpoint expects:
1. An empty request body
2. An Authorization header in the format: Authorization: Basic base64(clientId:clientSecret)

In other words, the client credentials should be passed in the Authorization header rather than in the request body.

Why this matters
Based on Engineering’s review, the current configuration appears to be sending the token request in a format that is not accepted by Swoogo. As a result, Adobe Experience Platform is unable to obtain the access token successfully, which is consistent with the error returned by the Destination Configuration Test API:
Cannot get authentication token due to a non-retryable error

Recommended next step
Engineering has recommended updating the destination authentication configuration to use a custom access token request so that the token call is sent in the format required by Swoogo.

Once the configuration has been updated, please re-run the Destination Configuration Test API and share the results with us. This will help confirm whether the authentication issue has been resolved.

Additional note
Engineering also noted that the Swoogo token response uses:
1. "type" for the token type
2. "expires_at" instead of "expires_in"

As a result, the response field mappings in the custom token request should also be adjusted accordingly.
 

DineshK
Level 2
June 18, 2026

Hi ​@Rrffgg

 

Based on Engineering's recommendation to use a custom access token request, can you try updating your auth config to this and run the Destination Configuration Test API again:

 

"customerAuthenticationConfigurations": [
{
"authType": "OAUTH2",
"grant": "OAUTH2_CLIENT_CREDENTIALS",
"accessTokenUrl": "https://api.swoogo.com/api/v1/oauth2/token",
"clientId": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET",
"options": {
"useBasicAuth": true,
"bodyParameters": {}
},
"accessTokenExtractPath": "access_token",
"tokenExpiryExtractPath": "expires_at",
"tokenTypeExtractPath": "type",
"scopes": []
}
]

What this addresses based on Engineering's notes:

  • useBasicAuth: true — sends credentials as Authorization: Basic base64(clientId:clientSecret) header
  • "bodyParameters": {} — sends an empty body as Swoogo requires
  • tokenExpiryExtractPath: "expires_at" — maps Swoogo's non-standard expiry field
  • tokenTypeExtractPath: "type" — maps Swoogo's non-standard token type field

Share the test results back here — if this doesn't work, please ask Engineering to provide the exact JSON structure they have in mind for the custom token request, as that will let us get this closed faster.

This gives them something actionable to test right now while also setting up the next step cleanly if it doesn't work.

RrffggAuthor
Level 2
June 18, 2026

Hi ​@DineshK 
is these server json is fine or need to update anything?

{

    "name": "Dest swoogo Server 1706",

    "destinationServerType": "URL_BASED",

    "urlBasedDestination": {

        "url": {

            "templatingStrategy": "PEBBLE_V1",

            "value": "https://api.swoogo.com/api/v1/contacts/create"

        }

    },

    "httpTemplate": {

        "httpMethod": "POST",

        "contentType": "application/json",

        "headers": [

            {

                "header": "Authorization",

                "value": {

                    "templatingStrategy": "PEBBLE_V1",

                    "value": "Bearer {{authData.accessToken}}"

                }

            }

        ],

        "requestBody": {

            "templatingStrategy": "PEBBLE_V1",

            "value": "{\n{% for profile in input.profiles %}\n{\n\"first_name\": \"{{ profile.attributes.first_name }}\",\n\"last_name\": \"{{ profile.attributes.last_name }}\",\n\"email\": \"{{ profile.attributes.email }}\"\n}{% if not loop.last %},{% endif %}\n{% endfor %}\n}"

        }

 

    }

}

DineshK
Level 2
June 18, 2026

Your server template looks good as-is — Bearer {{authData.accessToken}} is correctly set up and will work once the auth config is sorted.

One thing I'd like to verify before confirming the template is fully complete — Swoogo's create contact endpoint, does it accept application/json or application/x-www-form-urlencoded? Can you do a quick test in Postman:

  • Method: POST
  • URL: https://api.swoogo.com/api/v1/contacts/create
  • Authorization: Bearer <your_access_token>
  • Body: try both JSON and form-data with first_namelast_nameemail and share which one returns a 200 OK

That'll confirm whether your current contentType: application/json in the server template is correct or needs to be switched to application/x-www-form-urlencoded.

Also the most important thing right now — run the Destination Configuration Test API after applying the updated auth config and share the response here. That's the single piece of information that tells us whether the token fetch is now working. Everything else is secondary until that's confirmed green.

Those two things will let us close this out completely.

RrffggAuthor
Level 2
June 18, 2026

Hi ​@DineshK 
same error  
below is full server and config jsons 
---server json---

{

    "name": "Dest swoogo Server 1806",

    "destinationServerType": "URL_BASED",

    "urlBasedDestination": {

        "url": {

            "templatingStrategy": "PEBBLE_V1",

            "value": "https://api.swoogo.com/api/v1/contacts/create"

        }

    },

    "httpTemplate": {

        "httpMethod": "POST",

        "contentType": "application/json",

        "headers": [

            {

                "header": "Authorization",

                "value": {

                    "templatingStrategy": "PEBBLE_V1",

                    "value": "Bearer {{authData.accessToken}}"

                }

            }

        ],

        "requestBody": {

            "templatingStrategy": "PEBBLE_V1",

            "value": "{\n{% for profile in input.profiles %}\n{\n\"first_name\": \"{{ profile.attributes.first_name }}\",\n\"last_name\": \"{{ profile.attributes.last_name }}\",\n\"email\": \"{{ profile.attributes.email }}\"\n}{% if not loop.last %},{% endif %}\n{% endfor %}\n}"

        }

    }

}


------------config json-------------
 

{
"name": "test Swoogo Data Extension 999 ",
"description": "insert swwogo contacts when segment qualifies",
"status": "TEST",
"customerAuthenticationConfigurations": [
{
"authType": "OAUTH2",
"grant": "OAUTH2_CLIENT_CREDENTIALS",
"accessTokenUrl": "https://api.swoogo.com/api/v1/oauth2/token",
"clientId": "l3u-Z2acsawo-4XjsICS2",
"clientSecret": "mX7-yfJsPHspIoJN8oHxdtXlixj-4l19p-9fHesgUo",
"options": {
"useBasicAuth": true,
"bodyParameters": {}
},
"accessTokenExtractPath": "access_token",
"tokenExpiryExtractPath": "expires_at",
"tokenTypeExtractPath": "type",
"scopes": []
}
],
"uiAttributes": {
"connectionType": "Server-to-server",
"category": "personalization",
"monitoringSupported": true,
"flowRunsSupported": true
},
"schemaConfig": {
"profileFields": [
{
"name": "email",
"title": "Email Address",
"type": "string",
"isRequired": true,
"readOnly": false,
"hidden": false
},
{
"name": "first_name",
"title": "First Name",
"type": "string",
"isRequired": false,
"readOnly": false,
"hidden": false
},
{
"name": "last_name",
"title": "Last Name",
"type": "string",
"isRequired": false,
"readOnly": false,
"hidden": false
}
],
"profileRequired": true,
"segmentRequired": true,
"identityRequired": true
},
"identityNamespaces": {
"Email": {
"acceptsAttributes": false,
"acceptsCustomNamespaces": false,
"acceptedGlobalNamespaces": {
"Email": {}
}
}
},
"destinationDelivery": [
{
"authenticationRule": "CUSTOMER_AUTHENTICATION",
"destinationServerId": "54276d2b-d51f-40f3-9b72-b5b31bc71c01"
}
],
"aggregation": {
"aggregationType": "BEST_EFFORT",
"bestEffortAggregation": {
"maxUsersPerRequest": 1,
"splitUserById": true,
"aggregationKey": {
"includeIdentity": true,
"oneIdentityPerGroup": true,
"includeSegmentId": true,
"includeSegmentStatus": true
}
}
}
}

i had checked contentType: application/json these is working in postman to create contacts
below are swoogo api offical doc:
https://swoogo.readme.io/reference/post_oauth2-token
https://swoogo.readme.io/reference/createcontact
in Request api token page  there it mentioned The body of the request must be grant_type=client_credentials. so we are missing these some where to add or let me do see any  other issue in my jsons  

DineshK
Level 2
June 18, 2026

The correct approach for a token endpoint that requires Basic Auth with a form body is the accessTokenRequest block. Here's the config built directly against the official SDK documentation:

 

"customerAuthenticationConfigurations": [
{
"authType": "OAUTH2",
"grant": "OAUTH2_CLIENT_CREDENTIALS",
"accessTokenUrl": "https://api.swoogo.com/api/v1/oauth2/token",
"clientId": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET",
"accessTokenRequest": {
"destinationServerType": "URL_BASED",
"urlBasedDestination": {
"url": {
"templatingStrategy": "PEBBLE_V1",
"value": "https://api.swoogo.com/api/v1/oauth2/token"
}
},
"httpTemplate": {
"httpMethod": "POST",
"requestHeaders": [
{
"header": "Content-Type",
"value": {
"templatingStrategy": "PEBBLE_V1",
"value": "application/x-www-form-urlencoded;charset=UTF-8"
}
},
{
"header": "Authorization",
"value": {
"templatingStrategy": "PEBBLE_V1",
"value": "Basic {{ ( authData.clientId + ':' + authData.clientSecret ) | b64encode }}"
}
}
],
"requestBody": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{ formUrlEncode('grant_type', 'client_credentials') | raw }}"
}
},
"responseFields": [
{
"templatingStrategy": "PEBBLE_V1",
"value": "{{ response.body.access_token }}",
"name": "accessToken"
},
{
"templatingStrategy": "PEBBLE_V1",
"value": "{{ response.body.expires_at }}",
"name": "expiresIn"
},
{
"templatingStrategy": "PEBBLE_V1",
"value": "{{ response.body.type }}",
"name": "tokenType"
}
]
}
}
]

What each piece does:

  • Basic {{ ( authData.clientId + ':' + authData.clientSecret ) | b64encode }} — correct Pebble syntax to Base64 encode credentials into the Authorization header exactly as Swoogo requires
  • formUrlEncode('grant_type', 'client_credentials') | raw — correct SDK helper to send grant_type=client_credentials as a form body parameter
  • responseFields — the correct way to map Swoogo's non-standard response fields. expires_at and type are explicitly mapped so the SDK doesn't default to looking for expires_in and token_type which Swoogo doesn't return
  • Content-Type: application/x-www-form-urlencoded;charset=UTF-8 — matches Swoogo's exact requirement

One thing to be aware of: expires_at in Swoogo's response is a Unix timestamp, not seconds-based like the standard expires_in. The SDK treats expiresIn as seconds internally, so token expiry timing may be off — but this won't block authentication from working.

Server template stays exactly as-is, no changes needed there.

Apply this config, run the Destination Configuration Test API, and share the response here.

RrffggAuthor
Level 2
June 18, 2026

 Hi ​@DineshK 
these is error is was getting still
{
    "results": [
        {
            "aggregationKey": {
                "destinationInstanceId": "5f4af04e-c7d3-4d42-880f-9e257ca15a79"
            },
            "httpCalls": [
                {
                    "traceId": "7a6e362b-6ec5-4c98-aeb4-243d75dc5d28",
                    "errorMessage": "Encountered error while processing the message: Cannot get authentication token due to a non-retryable error"
                }
            ]
        }
    ],
    
config json i used 
 

{
"name": "test Swoogo Data Extension 777",
"description": "insert swwogo contacts when segment qualifies",
"status": "TEST",
"customerAuthenticationConfigurations": [
{
"authType": "OAUTH2",
"grant": "OAUTH2_CLIENT_CREDENTIALS",
"accessTokenUrl": "https://api.swoogo.com/api/v1/oauth2/token",
"clientId": "l3u-Z2acsawo-4XjsICS2",
"clientSecret": "mX7-yfJsPHspIoJN8oHxdtXlixj-4l19p-9fHesgUo",
"accessTokenRequest": {
"destinationServerType": "URL_BASED",
"urlBasedDestination": {
"url": {
"templatingStrategy": "PEBBLE_V1",
"value": "https://api.swoogo.com/api/v1/oauth2/token"
}
},
"httpTemplate": {
"httpMethod": "POST",
"headers": [
{
"header": "Content-Type",
"value": {
"templatingStrategy": "PEBBLE_V1",
"value": "application/x-www-form-urlencoded;charset=UTF-8"
}
},
{
"header": "Authorization",
"value": {
"templatingStrategy": "PEBBLE_V1",
"value": "Basic bDN1LVoyYWNzYXdvLTRYanNJQ1MyOm1YNy15ZkpzUEhzcElvSk44b0h4ZHRYbGl4ai00bDE5cC05Zkhlc2dVbw=="
}
}
],
"requestBody": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{ formUrlEncode('grant_type', 'client_credentials') | raw }}"
}
},
"responseFields": [
{
"templatingStrategy": "PEBBLE_V1",
"value": "{{ response.body.access_token }}",
"name": "accessToken"
},
{
"templatingStrategy": "PEBBLE_V1",
"value": "{{ response.body.expires_at }}",
"name": "expiresIn"
},
{
"templatingStrategy": "PEBBLE_V1",
"value": "{{ response.body.type }}",
"name": "tokenType"
}
]
}
}
],
"uiAttributes": {
"connectionType": "Server-to-server",
"category": "personalization",
"monitoringSupported": true,
"flowRunsSupported": true
},
"schemaConfig": {
"profileFields": [
{
"name": "email",
"title": "Email Address",
"type": "string",
"isRequired": true,
"readOnly": false,
"hidden": false
},
{
"name": "first_name",
"title": "First Name",
"type": "string",
"isRequired": false,
"readOnly": false,
"hidden": false
},
{
"name": "last_name",
"title": "Last Name",
"type": "string",
"isRequired": false,
"readOnly": false,
"hidden": false
}
],
"profileRequired": true,
"segmentRequired": true,
"identityRequired": true
},
"identityNamespaces": {
"Email": {
"acceptsAttributes": false,
"acceptsCustomNamespaces": false,
"acceptedGlobalNamespaces": {
"Email": {}
}
}
},
"destinationDelivery": [
{
"authenticationRule": "CUSTOMER_AUTHENTICATION",
"destinationServerId": "99d8958d-04b2-4391-99a3-bb3e1f59391e"
}
],
"aggregation": {
"aggregationType": "BEST_EFFORT",
"bestEffortAggregation": {
"maxUsersPerRequest": 1,
"splitUserById": true,
"aggregationKey": {
"includeIdentity": true,
"oneIdentityPerGroup": true,
"includeSegmentId": true,
"includeSegmentStatus": true
}
}
}
}

these config json used and below i changed

 

  •  {

                                "header": "Authorization",

                                "value": {

                                    "templatingStrategy": "PEBBLE_V1",

                                    "value": "Basic bDN1LVoyYWNzYXdvLTRYanNJQ1MyOm1YNy15ZkpzUEhzcElvSk44b0h4ZHRYbGl4ai00bDE5cC05Zkhlc2dVbw==" ---these is constant  value we have these encoded url as the syntax u shared is getting error

                                }


 

RrffggAuthor
Level 2
June 19, 2026

Hi ​@DineshK 
swoogo connection is not working asked abode support. Im  was working on other thing  to ingest data in to Sfmc DE actually these is working able ingest data into it i need one more thing if im sending multiple segments profiles to that DE need to ingest segemnt name details in order to track which profile qualifed for which segment  so what need to be added in config or server json .can you help on these
server json
 

{
"name": "Dest Sfmc Server 0906",
"destinationServerType": "URL_BASED",
"urlBasedDestination": {
"url": {
"templatingStrategy": "PEBBLE_V1",
"value": "https://mc0fg4tv29db3j89qw46wmj1kdb8.rest.marketingcloudapis.com/data/v1/async/dataextensions/key:1DC511B5-DC04-467F-B4A7-641823B0F37F/rows"
},
"splitUserById": false
},
"httpTemplate": {
"httpMethod": "POST",
"contentType": "application/json",
"requestBody": {
"templatingStrategy": "PEBBLE_V1",
"value": "{\n \"items\": [\n {% for profile in input.profiles %}\n {\n \"firstname\": \"{{ profile.attributes.firstname }}\",\n \"lastname\": \"{{ profile.attributes.lastname }}\",\n \"emailaddress\": \"{{ profile.attributes.emailaddress }}\"\n }{% if not loop.last %},{% endif %}\n {% endfor %}\n ]\n}"
}
}
}

config json
 

{
"name": "test SFMC Data Extension 0906",
"description": "insert SFMC Data Extension when segment qualifies",
"status": "TEST",
"customerAuthenticationConfigurations": [
{
"authType": "OAUTH2",
"grant": "OAUTH2_CLIENT_CREDENTIALS",
"accessTokenUrl": "https://mc0fg4tv29db3j89qw46wmj1kdb8.auth.marketingcloudapis.com/v2/token",
"clientId": "l6bpg6jvw3rlgd4a1cc9jlrs",
"clientSecret": "hrjQmMh01BXjQuoPae8KCdne",
"options": {
"useBasicAuth": true
}
}
],
"uiAttributes": {
"connectionType": "Server-to-server",
"category": "personalization",
"monitoringSupported": true,
"flowRunsSupported": true
},
"schemaConfig": {
"profileFields": [
{
"name": "emailaddress",
"title": "Email Address",
"type": "string",
"isRequired": true,
"readOnly": false,
"hidden": false
},
{
"name": "firstname",
"title": "First Name",
"type": "string",
"isRequired": false,
"readOnly": false,
"hidden": false
},
{
"name": "lastname",
"title": "Last Name",
"type": "string",
"isRequired": false,
"readOnly": false,
"hidden": false
}
],
"profileRequired": true,
"segmentRequired": true,
"identityRequired": true
},
"identityNamespaces": {
"Email": {
"acceptsAttributes": false,
"acceptsCustomNamespaces": false,
"acceptedGlobalNamespaces": {
"Email": {}
}
}
},
"destinationDelivery": [
{
"authenticationRule": "CUSTOMER_AUTHENTICATION",
"destinationServerId": "6fb07bb9-7887-43c9-a1e9-1bf50097ffef"
}
],
"aggregation": {
"aggregationType": "BEST_EFFORT",
"bestEffortAggregation": {
"maxUsersPerRequest": 100,
"splitUserById": true,
"aggregationKey": {
"includeIdentity": true,
"oneIdentityPerGroup": true,
"includeSegmentId": true,
"includeSegmentStatus": true
}
}
}
}

 

DineshK
Level 2
June 19, 2026

Good to hear the SFMC integration is working. For tracking which segment a profile qualified for, you need to add segment ID and status to your request body template.

Update your server template requestBody to include these two fields:

 

"requestBody": {
"templatingStrategy": "PEBBLE_V1",
"value": "{\n \"items\": [\n {% for profile in input.profiles %}\n {\n \"firstname\": \"{{ profile.attributes.firstname }}\",\n \"lastname\": \"{{ profile.attributes.lastname }}\",\n \"emailaddress\": \"{{ profile.attributes.emailaddress }}\",\n \"segmentId\": \"{{ input.aggregationKey.segmentId }}\",\n \"segmentStatus\": \"{{ input.aggregationKey.segmentStatus }}\"\n }{% if not loop.last %},{% endif %}\n {% endfor %}\n ]\n}"
}

Also add these two fields to your schemaConfig.profileFields:

 

{
"name": "segmentId",
"title": "Segment ID",
"type": "string",
"isRequired": false,
"readOnly": false,
"hidden": false
},
{
"name": "segmentStatus",
"title": "Segment Status",
"type": "string",
"isRequired": false,
"readOnly": false,
"hidden": false
}

A couple of things to note:

  • input.aggregationKey.segmentId and input.aggregationKey.segmentStatus are the correct Destination SDK variables for this — confirmed against the official message format docs. segmentStatus returns either realized (profile entered the segment) or exited (profile left the segment)
  • Your aggregation config already has includeSegmentId: true and includeSegmentStatus: true set correctly, so these variables will be populated automatically at export time
  • Make sure you also add segmentId and segmentStatus columns to your SFMC Data Extension so the payload has somewhere to land

Since you're sending multiple segments, each batch will be grouped by segment due to splitUserById: true in your aggregation config, so every row in the DE will have the correct segment ID stamped against it.