May 19, 2022 3:28 PM
Straight from your documentation at https://developers.hubspot.com/docs/api/marketing/transactional-emails:
curl --request GET \
--url 'https://api.hubapi.com/marketing/v3/transactional/smtp-tokens/sampletokenId?hapikey=YOUR_HUBSPOT_API...'
Returns this:
{"status":"error","message":"Authentication credentials not found. This API supports both API Key and OAuth 2.0 authentication and you can find more details at https://developers.hubspot.com/docs/methods/auth/oauth-overview","correlationId":"3ae631fc-9e97-49bd...
There's at least one other person reporting this in the forums:
https://community.hubspot.com/t5/APIs-Integrations/SMTP-Token-Transactional-Mail-INVALID-AUTHENTICAT...
And to head off some questions:
1) Yes, I have transactional emails activated.
2) Yes, the API key I am using is valid, it only breaks on this call.
3) You also have to escape the token, as it is not URL-encoded by default and usually ends in two ==s, and that's not noted either.
May 20, 2022 3:58 PM
Hey @theferrett ,
Thanks for the feedback here. I will work with the team on this to figure out what is going on.
Just to confirm, when you say it only breaks on this call, you are talking very specifically about this endpoint or more generally for this API?
Does doing a get request for https://api.hubapi.com/marketing/v3/transactional/smtp-tokens work for you?
Just want to make sure I am very clear 😀
May 20, 2022 5:21 PM
Just to confirm, when you say it only breaks on this call, you are talking very specifically about this endpoint or more generally for this API?
Does doing a get request for https://api.hubapi.com/marketing/v3/transactional/smtp-tokens work for you?
Just want to make sure I am very clear 😀
This endpoint specifically, though the other endpoint you referenced doesn't work either. However, I have used this same Api Token to hit every email end point, to create tickets, and to associate emails with tickets (such as your API allows), so I'm reasonably sure it's not the request.
https://api.hubapi.com/marketing/v3/transactional/smtp-tokens?hapikey=MY_API_KEY
To be clear, that fails with the same error, with a key I have already used in several other API end points successfully.
May 20, 2022 5:24 PM
Thank you for confirming. Will look into this!
Jun 2, 2022 3:43 PM
Any new news?
Jun 3, 2022 10:27 AM
Apologies on the delay. 100% my mistake. Verified the issue and the engineering team is working on this now. I will report back (I promise) when there is a resolution. Thanks for the patience 😀
Nov 14, 2022 6:51 AM
Any news on this?
I have the same problem. I cannot send transactional emails using this endpoint:
Jun 21, 2022 9:46 PM
This is still happening with /settings/v3/users/userId.
Even with hapikey= on queryparams or with Bearer authentication, the result is the same, a 401 error