CMS Development

BarryGrennan
Top Contributor

Not possible to upload DND templates through CLI?

SOLVE

I can fetch all templates ok, including dnd templates. But when I try to upload them to my development portal I get the error 

" User does not have permission to create the resource with id XXXXXXXXXX."

2 Accepted solutions
Gonzalo
Solution
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Not possible to upload DND templates through CLI?

SOLVE

My bad, I assumed by drag&drop the "new" dnd areas for coded templates.
If you are referring to old dnd templates I think you are right (just tested, in case you may have a syntax error) but no luck here. Not even with --debug to see some extra insight. Seems like it's (or will be soon) deprecated:

https://developers.hubspot.com/docs/cms/building-blocks/templates/drag-and-drop-templates


I believe the best way you can do something similar is with the API, you will need the global API key tho, so may not be ideal (and you will need a wrapper to work locally and handle the requests).

Extra links for API clients, in case you wanna go that route:

- Node.js

- PHP

- Python

- Ruby

If this answer helps you to solve your questions please mark it as a solution.

Thank you,


Gonzalo Torreras

HubSpot freelance developer

hola@gonzalotorreras.com
www.gonzalotorreras.com
Schedule a meeting

View solution in original post

webdew
Solution
Guide | Diamond Partner
Guide | Diamond Partner

Not possible to upload DND templates through CLI?

SOLVE

Hi @BarryGrennan ,

Sometimes these issues are happened because of a config file. You can create a new file or check the permissions.
Kindly refer to this document https://developers.hubspot.com/docs/cms/personal-access-key

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.

View solution in original post

4 Replies 4
webdew
Solution
Guide | Diamond Partner
Guide | Diamond Partner

Not possible to upload DND templates through CLI?

SOLVE

Hi @BarryGrennan ,

Sometimes these issues are happened because of a config file. You can create a new file or check the permissions.
Kindly refer to this document https://developers.hubspot.com/docs/cms/personal-access-key

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.

Gonzalo
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Not possible to upload DND templates through CLI?

SOLVE

I think you may have an issue related to HS permissions.

I would recommend first removing your current personal key and regenerate it, making sure you activated the right scopes.

If it doesn't work, make sure you have the right permissions on your account for that portal.

Quick links:

Permission settings:  https://app.hubspot.com/portal-recommend/l?slug=settings/users

Permission guide: https://knowledge.hubspot.com/settings/hubspot-user-permissions-guide

CMS personal key: https://app.hubspot.com/portal-recommend/l?slug=personal-access-key

 

If this answer helps you to solve your questions please mark it as a solution.

Thank you,


Gonzalo Torreras

HubSpot freelance developer

hola@gonzalotorreras.com
www.gonzalotorreras.com
Schedule a meeting
BGrennan
Contributor

Not possible to upload DND templates through CLI?

SOLVE

Thanks for the reply, 

 

I reissued my permission key but to no avail. I have total access to my developer portal, am super admin etc.

 

Perhaps I can clarify a bit: It's drag and drop templates that won't upload. Coded templates work fine.

Gonzalo
Solution
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Not possible to upload DND templates through CLI?

SOLVE

My bad, I assumed by drag&drop the "new" dnd areas for coded templates.
If you are referring to old dnd templates I think you are right (just tested, in case you may have a syntax error) but no luck here. Not even with --debug to see some extra insight. Seems like it's (or will be soon) deprecated:

https://developers.hubspot.com/docs/cms/building-blocks/templates/drag-and-drop-templates


I believe the best way you can do something similar is with the API, you will need the global API key tho, so may not be ideal (and you will need a wrapper to work locally and handle the requests).

Extra links for API clients, in case you wanna go that route:

- Node.js

- PHP

- Python

- Ruby

If this answer helps you to solve your questions please mark it as a solution.

Thank you,


Gonzalo Torreras

HubSpot freelance developer

hola@gonzalotorreras.com
www.gonzalotorreras.com
Schedule a meeting