0

Currently using the latest FuelSDK from Nuget.

Creating the client as such:

            var parameters = new NameValueCollection
                         {
                             { "clientId", ConfigurationManager.AppSettings["clientId"] },
                             { "clientSecret", ConfigurationManager.AppSettings["clientSecret"] },
                             { "authEndPoint", ConfigurationManager.AppSettings["authEndPoint"] },
                             { "restEndPoint", ConfigurationManager.AppSettings["restEndPoint"] },
                             { "soapEndPoint", ConfigurationManager.AppSettings["soapEndPoint"] },
                             { "useOAuth2Authentication", ConfigurationManager.AppSettings["useOAuth2Authentication"] },
                             { "applicationType", ConfigurationManager.AppSettings["applicationType"] },
                             { "accountId", ConfigurationManager.AppSettings["accountId"] },
                             { "scope", ConfigurationManager.AppSettings["scope"] },
                             { "grantType", ConfigurationManager.AppSettings["grantType"] }
                         };
        var client = new ETClient(parameters);

We use the following config details:

    <add key="appSignature" value="none" />
<add key="clientId" value="" />
<add key="clientSecret" value="" />
<add key="authEndPoint" value="https://mc4mgjj9pyjwv6q77jsr9t0kj9fq.auth.marketingcloudapis.com" />
<add key="restEndPoint" value="https://mc4mgjj9pyjwv6q77jsr9t0kj9fq.rest.marketingcloudapis.com" />
<add key="soapEndPoint" value="https://mc4mgjj9pyjwv6q77jsr9t0kj9fq.soap.marketingcloudapis.com" />
<add key="useOAuth2Authentication" value="true" />
<add key="applicationType" value="server" />
<add key="accountId" value="" />
<add key="scope" value="email_write" />
<add key="grantType" value="client_credentials" />

Then creating a subscriber and trying to post it off to SF:

            var subscriber = new ETSubscriber
                         {
                             AuthStub = client,
                             EmailAddress = "example@example.com",
                             SubscriberKey = "example@example.com",
                             Status = SubscriberStatus.Active,
                             Attributes = new Attribute[]
                                          {
                                              new ETProfileAttribute
                                              {
                                                  Name = "Foo", Value = "foo"
                                              },
                                              new ETProfileAttribute
                                              {
                                                  Name = "Bar", Value = "bar"
                                              }
                                          }
                         };
        var response = subscriber.Post();

The post response fails and we get:

enter image description here

According to our contact at SF they stated I can confirm that on the REST package I have granted full access to all of properties when I created the package

Any help would be apperciated

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.