Create Package throws an 403 forbidden exception
Monday, November 27, 2023 at 10:55amHi,
I am using api key for authentication, retrieving template works fine but when i tried to create package it thrown 403 forbidden error.
We might be missing some settings on the account. Can you guide us
Thanks
Reply to: Create Package throws an 403 forbidden exception
Monday, December 4, 2023 at 09:10amHi Balwinder,
Thanks for the info!
Could you log in as the manager, navigate to the template you've created, and share the template as showed in the attachment? This should be able to grant your owner access to this template.
Duo
Reply to: Create Package throws an 403 forbidden exception
Monday, November 27, 2023 at 11:14amHi Balwinder,
Thanks for your post! Can you share below information:
(1)The entire error message.
(2)Base64 decode your API Key, then share the username part (first half before colon), this is your sender ID.
(3)The template ID.
Duo
Reply to: Create Package throws an 403 forbidden exception
Saturday, December 2, 2023 at 10:36amWe have admin account and Manager level account setup. This template is defined under Manager account.
I am using ClientId and ClientAppSecret with TokenType = Owner
1- Could not create a package from template. Exception: The remote server returned an error: (403) Forbidden. HTTP POST on URI https://sandbox.esignlive.com/api/packages/jFQMUc8hvz8xqQmHusMjRpYEbvs=/clone. Optional details: {"messageKey":"error.forbidden.template","message":"You do not have access to this template.","code":403,"name":"Access Denied"}
3- jFQMUc8hvz8xqQmHusMjRpYEbvs=
Thanks
Reply to: Create Package throws an 403 forbidden exception
Monday, December 4, 2023 at 12:52pmHi Duo,
This worked. I have follow up question.
I dont see the transaction i created under manager account. I am assuming it will be created under admin account as we are using there api key.
How can we create transaction under sub accounts i.e. Manage account.
Thanks
Reply to: Create Package throws an 403 forbidden exception
Monday, December 4, 2023 at 01:29pmHi Balwinder,
Yes, your assumption is correct.
In order to set transaction sender, there are two ways:
(1)Still with owner's API Key/Token, and specify "sender" attribute in your request payload:
POST /api/packages/jFQMUc8hvz8xqQmHusMjRpYEbvs=/clone
{
......,
"sender":{
"email":"manager's email"
}
}
I personally would suggest this approach since you are only using owner's credentials.
(2)Or alternatively if you are using api token, request an API Token for the manager in this call:
POST /apitoken/clientApp/accessToken
{ "clientId": " your_client_id ", "secret": " your_client_secret ", "type": "SENDER", "email": "sender_email" }
Duo