bsohi | Posts: 7

Create Package throws an 403 forbidden exception

0 votes

Hi,

 

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

 


Approved Answer
Duo_Liang | Posts: 3776

Reply to: Create Package throws an 403 forbidden exception

0 votes

Hi 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

 


Attachments
Duo_Liang | Posts: 3776

Reply to: Create Package throws an 403 forbidden exception

0 votes

Hi 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

 

 

 


bsohi | Posts: 7

Reply to: Create Package throws an 403 forbidden exception

0 votes

We 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

 


bsohi | Posts: 7

Reply to: Create Package throws an 403 forbidden exception

0 votes

Hi 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


Duo_Liang | Posts: 3776

Reply to: Create Package throws an 403 forbidden exception

0 votes

Hi 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


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off