HubSpot/hubspot-api-php

Why email not delivered using single-send-api?

pragna-php opened this issue · 15 comments

Hello everyone,

Using this API I am getting sent status but it is not actually delivering the email to the email address.

Can anyone please provide solution to my query because as per my knowledge it should be delivered to the inbox of the email address.

Any help would be really appreciated. Thank you in advance!

Hello @ALL

Please let me know if anyone has any idea related to this.

Thanks

Hey @pragna-php, could you please provide payload and response body for the request?

Hey @pragna-php
I've send request and I found email in spam.

$hubspot = Factory::createWithAccessToken($_ENV['HUBSPOT_PRIVATE_APP_ACCESS_TOKEN']);

$response = $hubspot->apiRequest([
  'method' => 'POST',
  'path' => '/marketing/v4/email/single-send',
  'body' => [
    'emailId' => 174651711258,
    'message' => [
      'to' => 'mr.green@example.ex'
    ]
  ]
]);

var_dump($response->getBody()->getContents());

Have you checked SPAM?

I am creating email template using mareketing api and while perform the single send api at that time given below error
"requiredScopes": [
"marketing-email",
"transactional-email"
]

I am use simple account without any premium and while try to enable scope checkbox is disable and showing tooltip like "Your account doesn't have access to this scope.".

Hello @ksvirkou-hubspot @atanasiuk-hubspot , Thank you for your reply !

Here is the required steps:

  1. Create custom template
  2. Save template as Email
  3. Send email using single-send-api

In these steps, I am sharing apis, request and response all. so that in between any issue then I can get suggestion. The thing is 3rd API throwing error of missing scope that actually their in my private app. Please check below and let me know what is the exact issue. Also Is it require to upgrade the account as I am using free demo account.

  1. Create custom template
    image

  2. Save template as Email
    image

  3. Send email using single-send-api
    image

Here in below screenshot is the application scoped which has available scope
image

I tried very hard to achieve the same but in 3rd step getting the issue. Please let me know if anything missing or wrong in above

I am creating email template using mareketing api and while perform the single send api at that time given below error "requiredScopes": [ "marketing-email", "transactional-email" ]

I am use simple account without any premium and while try to enable scope checkbox is disable and showing tooltip like "Your account doesn't have access to this scope.".

You must have a Marketing Hub Enterprise account, otherwise, you won't be able to use it.

Hello @ksvirkou-hubspot @atanasiuk-hubspot , Thank you for your reply !

Here is the required steps:

  1. Create custom template
  2. Save template as Email
  3. Send email using single-send-api

In these steps, I am sharing apis, request and response all. so that in between any issue then I can get suggestion. The thing is 3rd API throwing error of missing scope that actually their in my private app. Please check below and let me know what is the exact issue. Also Is it require to upgrade the account as I am using free demo account.

  1. Create custom template
    image
  2. Save template as Email
    image
  3. Send email using single-send-api
    image

Here in below screenshot is the application scoped which has available scope image

I tried very hard to achieve the same but in 3rd step getting the issue. Please let me know if anything missing or wrong in above

Try to send the same request to POST https://api.hubapi.com/marketing/v4/email/single-send.

Снимок экрана 2024-08-08 в 14 32 56

have you premium account?

What is premium account?
I have subscription - Marketing Hub Enterprise

Got it @ksvirkou-hubspot
Once I upgrade my account then after the issue get fixed.
Thank you so much for your replies and support. I really appreciate this. Thank you !

Got it @ksvirkou-hubspot Once I upgrade my account then after the issue get fixed. Thank you so much for your replies and support. I really appreciate this. Thank you !

Do you have any subscription now?

Not yet but shortly will get and test again this api.

Feel free to reopen it if you have any questions/other errors.