salesforce-marketingcloud / FuelSDK-Ruby

Fuel SDK for Ruby
BSD 3-Clause "New" or "Revised" License
52 stars 155 forks source link

Trouble connecting to the client after the April 1st Permission update #95

Closed jeremygpeterson closed 5 years ago

jeremygpeterson commented 5 years ago

On the Account Information, for API Integration, there are 6 different pieces of information on the page:

From the readme this is what is available:

myclient = MarketingCloudSDK::Client.new(
  'client' => {
    'id' => 'exampleID',
    'secret' => 'exampleSecret',
    'base_api_url' => 'http://getapis',
    'request_token_url' => 'http://authapi',
    'soap_endpoint' => 'http://soapendpoint'})

I've tried mapping several variations, but it's not working for me. Is there a better example of the code above that would indicate what's best to use here?

jeremygpeterson commented 5 years ago

I made a few changes to this logic, I haven't had much luck with soap.

myclient = MarketingCloudSDK::Client.new(
  'client' => {
    'id' => 'exampleID',
    'secret' => 'exampleSecret',
    'base_api_url' => 'https://########.rest.marketingcloudapis.com',
    'request_token_url' => 'https://auth.exacttargetapis.com/v1/requestToken', # using the default token url
})
sfdrogojan commented 5 years ago

Hi @jeremygpeterson!

Please use the Authentication Tenant Specific Endpoint URL for the 'request_token_url' key, like in the example bellow:

myclient = MarketingCloudSDK::Client.new( 'client' => { 'id' => 'exampleID', 'secret' => 'exampleSecret', 'base_api_url' => 'https://########.rest.marketingcloudapis.com', 'request_token_url' => 'https://########.auth.marketingcloudapis.com/v1/requestToken' })

jeremygpeterson commented 5 years ago

Thanks that helped a lot, based on that pattern I updated soap using the same pattern.


myclient = MarketingCloudSDK::Client.new(
  'client' => {
    'id' => 'exampleID',
    'secret' => 'exampleSecret',
    'base_api_url' => 'https://########.rest.marketingcloudapis.com',
    'request_token_url' => 'https://########.auth.marketingcloudapis.com/v1/requestToken',
    'soap_endpoint' => 'https://########.auth.marketingcloudapis.com/v1/requestToken',
})```