sometimes the javascript client will only work with a webmapid which is requesting from portal to send a definition for a webmap components like layers, extents and bookmarks.
you can also use cartoview www.cartologic.com/cartoview to return a web map
www.cartologic.com/cartoview/apps/cartoserver/help/webmap