retrieving Sender via email adderess ( works ) vs Sender ID ( fails )
Tuesday, February 16, 2021 at 05:01pmAfter doing some 11.39 SANDBOX testing; seems retrieving Sender via Email works but retrieving Sender via Sender ID does not.
{{TheHost}}/api/account/senders/1iVOFpzqGzoF
{
"messageKey": "error.forbidden.viewSender",
"message": "You do not have the necessary permission to view this sender.",
"code": 403,
"name": "Access Denied"
}
I shouldn't have security issue as I'm owner of Account. Any idea's?
Reply to: retrieving Sender via email adderess ( works ) vs Sender ID ( fails )
Wednesday, February 17, 2021 at 09:21amFYI testing via POSTMAN application . . .
Reply to: retrieving Sender via email adderess ( works ) vs Sender ID ( fails )
Wednesday, February 17, 2021 at 10:02amHi Mike,
It looks like an insufficient permission error to me - if I used a Regular sender's API Key or API Token and query these two endpoints:
GET /api/account/senders?from=1&to=1&search={sender_email}
GET /api/account/senders/{senderId}
The first call returned success, and the second call hit the same 403 error.
So firstly, could you kindly check if you are using the correct API Key/Token? There's an easy way to test whom this API Key/Token belongs to:
GET /api/session
and search in the response: "user" > "email"
Duo
Reply to: retrieving Sender via email adderess ( works ) vs Sender ID ( fails )
Wednesday, February 17, 2021 at 10:26amHi Duo, if I use APIkey value in header and retrieve session object ( {{TheHost}}/api/session ) it seems to show below. Should this not be my email address???
Reply to: Hi Duo, if I use APIkey…
Wednesday, February 17, 2021 at 10:35amHi Mike,
That's an interesting finding!
#1 Could you log onto your sender portal, choose the "API Access" from the "Admin" dropdown and double check your API Key against the one you input in Postman?
#2 session owner should be the API Key holder, so either the Postman is using the wrong API Key, or at the same time, I am investigating if the delegation feature could affect the session owner.
Duo
Reply to: Hi Mike, That's an…
Wednesday, February 17, 2021 at 11:00amYou were correct. Found/fixed typo and seems to work as it should now.