({{, (RefLink[EmbedCode, paclet:ref/EmbedCode])[obj]
generates the code necessary to embed the object obj on a webpage.}, {, (RefLink[EmbedCode, paclet:ref/EmbedCode])[obj,"dest"] 
generates code for an external environment or language of type "dest".}, {, (RefLink[EmbedCode, paclet:ref/EmbedCode])[obj,"dest",dir]
saves the generated code as files in the directory dir.}, {, (RefLink[EmbedCode, paclet:ref/EmbedCode])[obj,"dest",loc]
saves the generated code as a file archive in the file location loc.}})

OpenersNotesSection(Spacer1)Details and Options

In (RefLink[EmbedCode, paclet:ref/EmbedCode])[obj], the object obj can be a (RefLink[CloudObject, paclet:ref/CloudObject]) and a (RefLink[URL, paclet:ref/URL]) that contains the URL of a cloud object.

(RefLink[EmbedCode, paclet:ref/EmbedCode])[obj] returns a string that can be inserted into the HTML of a webpage to embed obj on the page.

In (RefLink[EmbedCode, paclet:ref/EmbedCode])[obj,"dest"], the object obj can be a function with head (RefLink[APIFunction, paclet:ref/APIFunction]) or (RefLink[FormFunction, paclet:ref/FormFunction]).

Possible destinations for (RefLink[EmbedCode, paclet:ref/EmbedCode]) are given by the value of (RefLink[$EmbedCodeEnvironments, paclet:ref/$EmbedCodeEnvironments]).

Destinations relevant to the web include:

Possible frameworks for interactive web content include:

General web frameworks include "Bootstrap" and "JQueryUI". (RefLink[None, paclet:ref/None]) uses no additional frameworks.

Destinations relevant to languages include (StringTypeLink["Java", paclet:ref/embeddingformat/Java]), (StringTypeLink["Python", paclet:ref/embeddingformat/Python]), (StringTypeLink["JavaScript", paclet:ref/embeddingformat/JavaScript]), "CSharp", etc.

In typical cases of external programming languages, (RefLink[EmbedCode, paclet:ref/EmbedCode]) returns an EmbeddingObject containing an (RefLink[Association, paclet:ref/Association]) giving a variety of elements necessary for the embedding.

Typical options for (RefLink[EmbedCode, paclet:ref/EmbedCode]) include:

With the default setting (RefLink[Permissions, paclet:ref/Permissions])->(RefLink[Automatic, paclet:ref/Automatic]), (RefLink[EmbedCode, paclet:ref/EmbedCode])[obj] will preserve the permissions for a cloud object obj and will use permissions given by (RefLink[$Permissions, paclet:ref/$Permissions]) if a new cloud object is created.

With an explicit setting for (RefLink[Permissions, paclet:ref/Permissions]), (RefLink[EmbedCode, paclet:ref/EmbedCode])[obj] will effectively use (RefLink[SetOptions, paclet:ref/SetOptions]) to change permissions of a cloud object obj.

OpenersPrimaryExamplesSection(Spacer1)Examples  (2)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Create embed code for embedding on the web:

EmbedCode[CloudDeploy["hello, world"]]

Specify the size of embedding region:

EmbedCode[CloudDeploy["hello, world"],ImageSize->{200,200}]

Create code for calling an API from Java:

EmbedCode[APIFunction[{"x"->"Integer"},#x^2&],"Java"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[CloudDeploy, paclet:ref/CloudDeploy])  ▪  (RefLink[Export, paclet:ref/Export])  ▪  (RefLink[ExportString, paclet:ref/ExportString])  ▪  (RefLink[XMLTemplate, paclet:ref/XMLTemplate])  ▪  (RefLink[StringTemplate, paclet:ref/StringTemplate])  ▪  (RefLink[CDFDeploy, paclet:ref/CDFDeploy])  ▪  (RefLink[APIFunction, paclet:ref/APIFunction])  ▪  (RefLink[$EmbedCodeEnvironments, paclet:ref/$EmbedCodeEnvironments])  ▪  (RefLink[ExternalFunction, paclet:ref/ExternalFunction])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Cloud Functions & Deployment, paclet:guide/CloudFunctionsAndDeployment])}, {▪(RefLinkPlain[Creating Instant APIs, paclet:guide/CreatingAnInstantAPI])}, {▪(RefLinkPlain[External Language Interfaces, paclet:guide/ExternalLanguageInterfaces])}, {▪(RefLinkPlain[Creating Form Interfaces & Apps, paclet:guide/CreatingFormsAndApps])}, {▪(RefLinkPlain[Sharing & Embedding Content, paclet:guide/SharingAndEmbeddingContent])}, {▪(RefLinkPlain[Web Operations, paclet:guide/WebOperations])}, {▪(RefLinkPlain[Setting Up Input Interpreters, paclet:guide/InterpretingStrings])}, {▪(RefLinkPlain[Code Compilation, paclet:guide/CodeCompilation])}, {▪(RefLinkPlain[Automated Reports, paclet:guide/AutomatedReports])}})}})

({{(Spacer1), ({{(Spacer1)Related Links}, {(WebLink[DocumentationFooterIconsRelatedLinks-FastIntro.png(Spacer1)Fast Introduction for Programmers: Cloud Deployment, http://www.wolfram.com/language/fast-introduction-for-programmers/cloud-deployment/])}, {(WebLink[DocumentationFooterIconsRelatedLinks-FastIntro.png(Spacer1)Fast Introduction for Programmers: External Connections, http://www.wolfram.com/language/fast-introduction-for-programmers/external-connections/])}, {(WebLink[DocumentationFooterIconsRelatedLinks-EIWL.png(Spacer1)An Elementary Introduction to the Wolfram Language, https://www.wolfram.com/language/elementary-introduction/36-creating-websites-and-apps.html])(WebLink[: Creating Websites and Apps, https://www.wolfram.com/language/elementary-introduction/36-creating-websites-and-apps.html])}})}})