Hubspot - Как дать разрешение * транзакционная электронная почта-smtp, транзакционная электронная почта * учетной записи? - PullRequest
0 голосов
/ 03 ноября 2019

Я хочу создать токены SMTP API для Hubspot для отправки электронных писем. Пример запроса рубина HTTParty.post("https://api.hubapi.com/email/public/v1/smtpapi/tokens?hapikey=#{key}", body: {'createdBy': 'demo', "campaignName":"test Transactional Email"})

Ответ - #<HTTParty::Response:0x7f97768c4988 parsed_response={"status"=>"error", "message"=>"This hapikey (key) does not have proper permissions! (requires any of [transactional-email-smtp, transactional-email])", "correlationId"=>"640b5b62-0efb-4b8f-88a5-e2b2a7a5a421", "requestId"=>"1e340b43-8521-446d-b6fc-595fee9f65a8"}, @response=#<Net::HTTPForbidden 403 Forbidden readbody=true>, @headers={"date"=>["Sat, 02 Nov 2019 21:44:26 GMT"], "content-type"=>["application/json;charset=utf-8"], "transfer-encoding"=>["chunked"], "connection"=>["close"], "set-cookie"=>["__cfduid=d2497db528e9e12e2e998eb7a18c2ef861572731065; expires=Sun, 01-Nov-20 21:44:25 GMT; path=/; domain=.hubapi.com; HttpOnly"], "x-trace"=>["2B2AE955EA3D578926C84F91E7047A3DBBDDBE875E000000000000000000"], "vary"=>["Accept-Encoding"], "access-control-allow-credentials"=>["false"], "cf-cache-status"=>["DYNAMIC"], "strict-transport-security"=>["max-age=31536000; includeSubDomains; preload"], "expect-ct"=>["max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""], "server"=>["cloudflare"], "cf-ray"=>["52f94a2a0bc8899d-MAA"]}>

Как я могу дать необходимые разрешения?

...