This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Adds a media item to a location.
Specify sourceUrl, a publicly reachable URL that Google fetches the image
from. The URL has to stay reachable until Google has fetched it. Returns the
created item, including the media key needed to delete it.
Two things to plan for:
sourceUrl creates two media items, so track what you've already added.Errors:
NOT_FOUND: the location isn't recorded for this site. Google isn't called.GOOGLE_API_CALL_FAILED: the call to Google failed. Google's status and
response are in the error payload.You can only call this method when authenticated as a Wix app or Wix user identity.
There is 1 error with this status code.
This method may also return standard errors. Learn more about standard Wix errors.