Skip to content
  • There are no suggestions because the search field is empty.

Authentication via Signed StringπŸ“°

Depending on the REST resource being used, you may be required to use one of two authentication types, API authentication or User authentication. The type of authentication required for each resource is listed as part of that resource's documentation

API authentication

If the REST resource you're calling requires API authentication, you must include these HTTP headers with your application's HTTP requests. They are:

  • X-Imagen-API-Key: The value must be your application's API key.

  • X-Imagen-API-Signature: The value must be a base64 digest of anΒ HMAC-SHA256Β hash prepended with the stringΒ HMAC-SHA256. The hashed content is a concatenation of a string (seeΒ Generating an Imagen API signature) and is signed with your application'sΒ secret access key.

  • X-Imagen-DateΒ orΒ Date: The value must be the time of the HTTP request inΒ RFC-7231, IMF-fixdateΒ format. This format requires time values in Coordinated Universal Time (UTC), although the format indicates UTC by the three-letter abbreviation for Greenwich Mean Time, "GMT", a predecessor of the UTC name. Required because Imagen will only accept a request if its time stamp is within Β±5 minutes of the time (UTC) at which it reaches the service.

  • (Optional)Β Content-Length: Size of the request body, in decimal number of OCTETs, as perΒ RFC-7230.

  • (Optional)Β Content-MD5: base64 of 128-bit MD5 digest of the request body, as perΒ RFC-1864.

  • (Optional)Β Content-Type: Media type of the request body, as perΒ RFC-7231.

Note:X-Imagen-DateΒ is included as some HTTP client libraries do not allow the developer to set theΒ DateΒ HTTP header manually or read its value for inclusion in theΒ X-Imagen-API-Signature. If bothΒ X-Imagen-DateΒ andΒ DateΒ are set, Imagen will take the value ofΒ X-Imagen-DateΒ and ignoreΒ Date. If the 'Date' header (https://tools.ietf.org/html/rfc7231#section-7.1.1.2) is used instead of 'X-Imagen-Date', then Imagen will ignore it unless it uses theΒ RFC-7231, IMF-fixdateΒ format. An example of a time stamp in the correct format is: 'Wed, 03 May 2015 09:04:08 GMT'. Two digits are required for all date and time numbers except for the year, which must be 4 digits. A single space between components is also required. If the format for the 'X-Imagen-Date' header is wrong your request will be rejected with an explanatory error message, so for ease of debugging, we recommend using the 'X-Imagen-Date' header, whether the 'Date' header is also used or not.

Generating an Imagen API signature

The value ofΒ X-Imagen-API-SignatureΒ is a base64 digest of anΒ HMAC-SHA256Β hash. The hashed content is a concatenation of the following string (see StringToSign) and is signed with your application'sΒ secret access key.

The values of the standard HTTP headers must be included in the string in the order shown, without header names. If an optional header is not being supplied with the request then the value must be left blank.

StringToSign = HTTPVERB + "\n" +
Content-Length + "\n" +
Content-MD5 + "\n" +
Content-Type + "\n" +
Date + "\n" +
CanonicalizedResource;

StringToSign summary

  • \n: All new-line characters shown are required within the signature string, even if the value preceding them is empty.

  • HTTPVERB: The HTTP method of your request e.g.Β POST,Β GET,Β PUT. It should always be uppercase.

  • Content-Length: The value of your request'sΒ Content-LengthΒ HTTP header, as perΒ RFC-7230. If not set, leave blank.

  • Content-MD5: The value of your request'sΒ Content-MD5Β HTTP header, as perΒ RFC-1864. If not set, leave blank.

  • Content-Type: The value of your request'sΒ Content-TypeΒ HTTP header (e.g.Β application/json), as perΒ RFC-7231. If not set, leave blank.

  • Date: The value of your request'sΒ X-Imagen-DateΒ orΒ DateΒ HTTP header inΒ RFC-7231, IMF-fixdateΒ format.

  • CanonicalizedResource: The Imagen REST resource being targeted by the request. For example, the canonicalized resource ofΒ https://example.com/core/v1/applicationΒ isΒ /core/v1/application

Example StringToSign before hashing

GET



Tue, 23 Jun 2015 12:54:48 GMT
/core/v1/application

Note:Β Content-LengthΒ andΒ Content-MD5Β values are empty as we have not included these HTTP headers in our request.

Example X-Imagen-API-Signature

Signing our StringToSign with the secret access keyΒ ujeQhWRMGY3YfK4vARjUGm9dMZ5lCoxtCMX64vsTΒ and prepending it withΒ HMAC-SHA256Β produces the followingΒ X-Imagen-API-SignatureΒ value:

HMAC-SHA256 4Xk9nftZ1Vr5OlHF4Wrxm5pisgY5WUHsS0bKNjzUJpE=

User authentication

If the REST resource you're calling requires user authentication, you must include two HTTP headers with your application's HTTP requests. They are:

  • X-Imagen-API-Key: The value must be your application's API key.

  • Authorization: Bearer {userAccessToken}:Β {userAccessToken}Β is anΒ Access tokenΒ granted to your application by a user that has authorized it to perform a specific set of actions on their behalf. AnΒ Access tokenΒ is granted by way of OAuth 2.0.

OAuth in Imagen

If you're developing an Imagen application, it's likely that you'll need to make use of an Imagen REST resource that requires user authentication, which necessitates the usage of anΒ Access token. AnΒ Access tokenΒ represents an Imagen user that has given permission for your application to perform actions on their behalf. To get anΒ Access tokenΒ for a user, your application must make use of Imagen's OAuth 2.0 implementation.

Imagen OAuth glossary

  • Authorization code: If a user authorizes your application to perform actions on their behalf, your application will be passed anΒ Authorization codeΒ that must be converted into anΒ Access tokenΒ within 30 seconds. After 30 seconds has elapsed, theΒ Authorization codeΒ will become invalid.

  • Access token: Used as part of the Authorization HTTP header when making an HTTP request to an Imagen REST resource that requires user authentication. AnΒ Access tokenΒ never expires, but can be revoked via ImagenWeb.

Supported OAuth grant types

  • Authorization code: The most common OAuth 2.0 grant type and most suited to applications where client credentials are stored securely.Β Authorization codeΒ grant type involves the user granting the client anΒ Authorization codeΒ that will then be exchanged for anΒ Access token. This must be used withΒ WebΒ applications.

  • Implicit: For applications unable to store client credentials securely (such as a mobile or JavaScript application), implicit grant type should be used. This is similar to theΒ Authorization codeΒ grant type except that the request returns anΒ Access tokenΒ instead of anΒ Authorization code. This must be used withΒ InstalledΒ applications.

Authorization code URL summary

  • imagenweb: URL to your instance of ImagenWeb.

  • apiKey: Your application'sΒ API Key.

  • redirectURI: Your application's redirect URI.

  • state: This will be sent back to your application as a query string parameter as part of the HTTP response from ImagenWeb, which can be used to verify that the responder is indeed ImagenWeb.

  • scope: A space separated list of scopes that are used to inform the user what your application intends to do on their behalf. The configuration of an application's scope is delegated to an Imagen administrator.

Authorization code grant type

Getting an Access token

To get anΒ Access tokenΒ for your application, you must first get anΒ Authorization code, which is returned after a user agrees to/authorizes your application. This agreement is made on ImagenWeb and then the resultantΒ Authorization codeΒ is returned to your application's Redirect URI as a query string parameter namedΒ code.

Getting an Authorization code

To get the aforementionedΒ Authorization code, your application must redirect the user to the following URL:

https://{imagenweb}/oauth/authorize?response_type=code&client_id={apiKey}&redirect_uri={redirectURI}&state={state}&scope={scope}

A successful authorization will pass the application theΒ Authorization codeΒ as a query string parameter namedΒ codeΒ to your application's Redirect URI:

{redirectURI}?code=xyz&state={state}

Converting an Authorization code into an Access token

Once your application has been granted anΒ Authorization code, it has 30 seconds to convert it into anΒ Access token.

To achieve this, it will need to make an HTTP POST request to the following URL:

https://{imagenweb}/oauth/token

With the following POST parameters:

grant_type=authorization_code&code={AuthorizationCode}

In order to authenticate your application with the OAuth 2.0 server, this HTTP request must also include a Basic authentication HTTP header, where the username is your application'sΒ API KeyΒ and password is theΒ Secret access key.

In summary, the equivalent cURL command for this HTTP POST request should look like:

curl -u {APIKey}:{SecretAccessKey} https://{imagenweb}/oauth/token -d 'grant_type=authorization_code&code={AuthorizationCode}'

A successfulΒ Access tokenΒ request will return a standardΒ Access tokenΒ in JSON format:

{"access_token":"03807cb390319329bdf6c777d4dfae9c0d3b3c35","token_type":"bearer","scope":null}

At this point, your application has anΒ Access token.

Implicit grant type

Getting an Access token

To get anΒ Access token, your application must redirect the user to the following URL:

https://{imagenweb}/oauth/authorize?response_type=token&client_id={apiKey}&redirect_uri={redirectURI}&state={state}&scope={scope}

If the redirect_uri is a URL, anΒ Access tokenΒ will be returned in the JSON format:

{"access_token":"03807cb390319329bdf6c777d4dfae9c0d3b3c35","token_type":"bearer","scope":null}

Other supported Redirect URIs

  • urn:ietf:wg:oauth:2.0:oob: TheΒ Access tokenΒ will be returned in the title bar of the browser and the web page will prompt the user to copy and paste the code into their application. This is useful when the application is unable to listen on an HTTP port.

  • urn:ietf:wg:oauth:2.0:oob:auto: TheΒ Access tokenΒ will be returned in the title bar of the browser and the web page will instruct the user to close the window. This is useful when your application reads theΒ Access tokenΒ from the title of the HTML page, but is unable to close the page itself.

Note: It is recommended that you make use of theΒ Download JSONΒ option for your application, which can be found on the Your applications page on ImagenWeb. The JSON file contains your application'sΒ API Key,Β Secret access key, Redirect URI and scopes.

Note: AnΒ Access tokenΒ never expires, but can be revoked via ImagenWeb. If it is revoked, a newΒ Access tokenΒ must be regenerated.

Accessibility πŸ‘Welcome to Imagen!Automated transcription (Speech-to-Text) πŸ‘¨β€πŸŽ“Welcome to Imagen!Developers' Guide πŸ“• πŸ”’Welcome to Imagen!How We Can Help You Onboard Your Content πŸ“•Welcome to Imagen!Introduction to Imagen πŸ“•Welcome to Imagen!Onboarding Guide πŸ“•Welcome to Imagen!The Imagen Transcoder Farm πŸ“•Welcome to Imagen!The Imagen Video Player πŸ“•Welcome to Imagen!Storage Availability πŸ€”Welcome to Imagen!Storage Options πŸ€”Welcome to Imagen!Storage Security πŸ€”Welcome to Imagen!Which Theme Is Right for Me πŸ€”Welcome to Imagen!Why Is User Experience So Important? πŸ€”Welcome to Imagen!Imagen Term Glossary πŸ“°Welcome to Imagen!Supported Browsers πŸ“°Welcome to Imagen!Video Player Keyboard Shortcuts πŸ“°Welcome to Imagen!What is a Media Object Timeline πŸ‘©β€πŸŽ“Welcome to Imagen!Newbie Checklist πŸ‘‹Welcome to Imagen!Activity History ⚑FindGoogle Analytics πŸ‘©β€πŸŽ“FindAdding Annotations to Your Video Content ⚑FindAnnotation Layers πŸ“•FindAnnotations GuideπŸ“•FindExporting Annotations ⚑FindGenerate Subtitles for Audio Content ⚑FindGenerate subtitles for video content ⚑FindGrouping Annotations on Export ⚑FindImagen Subtitle Guide πŸ“•FindReordering Objects Within a Collection πŸ“•FindCustom ReportingFindHow can I see the Open-Source Programming Languages used by Imagen? πŸ€”FindIf I search on the homepage, I get one type of search URL. But I get a different kind of URL on the "Search Results Page" πŸ€”FindMy search results seem out of date ⚠️FindWhat metadata does Imagen extract from my video content? πŸ€”FindImagen Query Language - Media Viewer Widget ⚑FindImagen Query Language Reference πŸ“°FindUnderstanding Imagen Query Language πŸ‘¨β€πŸ«FindArtificial Intelligence ServicesFindDescriptive Metadata Fields πŸ“•FindExtracting Image Metadata on Import ⚑FindField Types and Record SchemaΒ πŸ“•FindImagen Query Language - Related Records View ⚑FindImagen Query Language Guide πŸ“•FindImagen XML Schema Mapping (XSLT) πŸ“•FindSingle/multi-select fields - remote validationFindActivate a Language license ⚑FindChange My Default Language ⚑FindDisplay Multilanguage Annotations ⚑FindHow to configure multilanguage logos ⚑Findlanguage packs πŸ“•FindCreating Parent/Child Field DependenciesFindDeleting RecordsFindRecords & Media Objects πŸ“•FindUpdating Records ⚑FindAdd Fields to the Search Index ⚑FindAdding a filter to the search page ⚑FindAdvanced Search Reference πŸ“°FindSaved Searches πŸ“•FindSearch Index Guide πŸ“•FindUpdating the Imagen Search Index ⚑FindBespoke Ingestion πŸ“•StoreWhat is a 'Watchfolder'? πŸ“•StoreImport from Dropbox ⚑StoreImport from OneDrive ⚑StoreUsing the Record (XML) Import Widget ⚑StoreCan non-media file types still be uploaded to Imagen?πŸ€”StoreCreate a record with media ⚑StoreCreate an empty record with metadata ⚑StoreCreate Imagen XML in Excel πŸ‘©β€πŸŽ“StoreCreateΒ multiple records, each with a single piece of media ⚑StoreImagen Media Workflows πŸ“•StoreImport Media from a URL ⚑StoreMedia Import and Ingestion πŸ“•StoreOptions for Onboarding your Metadata and Media πŸ€”StorePFR (Partial File Restore) and Segments πŸ“•StoreWhat information do you store about my video during ingest? πŸ€”StoreBurnt-in Timecodes (BITC) πŸ“•StoreThe Imagen Image Editor ⚑StoreWatermarking ⚑Store.PDF ViewerStoreAdd a Document Viewer ⚑StoreConfiguring Amazon S3 Intelligent-TieringStoreStorage Costs πŸ“•StoreStorage Profile Reference πŸ“„StoreStorage Replication 🌐StoreSupported File Types πŸ“°StoreConfiguring Amazon S3 Storage TutorialStoreConfiguring Wasabi Storage TutorialStoreStorage LocationsStoreWhy Has My Media Failed to Ingest to Wasabi? πŸ€”StoreConfiguring "Download Profiles" ⚑DistributeInstalling and Using Imagen Accelerated File Delivery (AFD) ⚑DistributeOrdering Clips on Behalf of Other Users πŸ“•DistributeEdit Live Stream Notification Emails ⚑DistributeImagen Live Connect API πŸ“°DistributeAd-hoc PaymentsDistributeIntroduction to Content Licensing πŸ“•DistributePrep: Imagen License and Stripe Accounts ⚑DistributeShopping Basket ConfigurationπŸ“„DistributeShopping BasketsΒ πŸ“•DistributeSubscription Configuration ⚑DistributeSubscription Overview πŸ“•DistributePOST /iweb/v1/notification πŸ“°DistributeAnonymous Sharing Links to Collections (Septeber Release)DistributeCollections πŸ“•DistributeEmbedding Media on External SitesDistributeShare media with unregistered usersDistributeSocial Media PublishingDistributeSunrise/Sunset Dates for Open Access Links ⚑DistributeCreate an MRSS Feed ⚑DistributeImagen Live Connect πŸ“•DistributeImagen MRSS Feed Response πŸ“°DistributeOver the top (OTT) Delivery πŸ“•DistributeBatch Editing Record & Media ACLManageCustom ACLsManageSet When Your Users Can Access Your Content ⚑ManageSetting Default Access Control Lists (ACL) for Records, Media, and Collections ⚑ManageSetting Record & Media Access Control Lists (ACL)ManageWhat are "ACLs"? πŸ€”ManageChanging Your Theme ⚑ManageDisplay banners on your site πŸ‘©β€πŸŽ“ManageI want to add a theme, which is right for me πŸ€”ManagePreview a theme before you commit ⚑ManageAdding Users to Groups ⚑ManageSet Permissions for a Group of Users ⚑ManageDynamic form ⚑ManageImagen Query Language - The Carousel Widget ⚑ManageMap Viewer Widget ⚑ManageWidgets πŸ“•ManageAdobe Premiere Pro IntegrationManageCache Page πŸ“„ManageCookies Page πŸ“°ManageDisplay Fields πŸ“„ManageEmail πŸ“„ManageEnvironment PageπŸ“°ManageFederations πŸ“°ManageGeolocation database πŸ“°ManageGlobal Settings Page πŸ“„ManageHealth Check Page πŸ“°ManageMailing List πŸ“„ManageMaintenance Mode πŸ“„ManageThe Imagen Admin Interface Directory πŸ“‹ (Private)ManageUpdate Page πŸ“°ManageUser Intelligence πŸ“•ManageCreate an OrganisationManageAdding users to user groups through organisations ⚑ManageConfiguring Federated SSO ⚑ManageConfiguring your SSO service provider ⚑ManageGuide to SSO πŸ‘©β€πŸ«ManageI'm being sent back to ImagenWeb from the IDP but I can't get any further πŸ€”ManageCustom Cookie Policy (Javascript) TutorialManageImagen Event ServiceManageBanning a User from Site Access ⚑ManageClear Users That Have Not Been ValidatedManageCreate a Custom Registration ProcessManageCreating Custom Registration FieldsManageCreating request/approval relationships ⚑ManageCustomizing your Login Page ⚑ManageGrant a User Administrator PermissionsManageGrant a User Developer PermissionsManageGranting Site Permissions to an Individual User ⚑ManageGuide to Building Access Control πŸ“•ManageIntroduction to Users, Groups, and Organisations πŸ“•ManageManage Permissions with Imagen πŸ“•ManagePreview Only AccessManageRestrict user sign-ups by geographyManageSetting User Signup RulesManageUser Permissions πŸ“°ManageHow do I add reCAPTCHA to my Imagen siteManageCore REST Interface πŸ“°DevelopersGET /api/v1/endpoints πŸ“°DevelopersGet /core/v1/application πŸ“°DevelopersGET /imcc/v1/job/list πŸ“°DevelopersGET /licenceStatus/πŸ“° WIPDevelopersGET /user/ πŸ“°DevelopersGET history πŸ“°DevelopersGET imcc/v1/job/count πŸ“°DevelopersGET job/searchπŸ“°DevelopersGET rights πŸ“°DevelopersPut /imcc/v1/job πŸ“°DevelopersAuthentication via Signed StringπŸ“°DevelopersHow to authenticate API calls with a Bearer token πŸ“°DevelopersCreating an Application in Imagen ⚑DevelopersGaining a Bearer Token ⚑DevelopersGET /iweb/v1/search πŸ“°DevelopersImagen API Documentation πŸ“• πŸ”’DevelopersGET /iweb/v1/notifications πŸ“°DevelopersGET Profiles πŸ“°DevelopersExample MRSS Reader (Powershell) πŸ“„DevelopersImagen XML Reference πŸ“°DevelopersNew metadata-only record with no media πŸ“°DevelopersNew record with a single piece of media πŸ“°DevelopersNew record with multiple pieces of mediaπŸ“°DevelopersRecord update adding new mediaπŸ“°DevelopersRecord update with metadata only πŸ“°DevelopersSet ACL by XML πŸ“°DevelopersGET /import/record πŸ“°DevelopersGET /iweb/v1/download πŸ“°DevelopersPUT /import/record/ πŸ“°DevelopersCreating a Video Record with the Imagen API πŸ‘©β€πŸ«DevelopersFind the UMID of a media file πŸ‘©β€πŸ«DevelopersHow to find an Import Record (job) GUID πŸ‘©β€πŸ«DevelopersHow to find your Media Control Centre FQDN ⚑ πŸ”’DevelopersHow to find your media ID πŸ‘©β€πŸ«DevelopersHow to Find Your Resource Group Name πŸ‘©β€πŸ«DevelopersProgrammatic API Call Examples πŸ“°DevelopersScopes πŸ“°DevelopersStandard Failure Response πŸ“°DevelopersWhat is a job priority? πŸ‘©β€πŸ«DevelopersDELETE /import/record/ πŸ“°DevelopersDELETE /media πŸ“°DevelopersGET /iweb/v1/users πŸ“°DevelopersWebhooksDevelopersXML Watch Folder Tutorial (Lambda) πŸ”’Partners & InternalDELETE /imcc/v1/media/ πŸ“° πŸ”’Partners & InternalDELETE /imcc/v1/record/ πŸ“° πŸ”’Partners & InternalDELETE imcc/v1/import/record/ πŸ“° πŸ”’Partners & InternalGET imcc/v1/import/record/ πŸ“° πŸ”’Partners & InternalGET imcc/v1/record/search πŸ“° πŸ”’Partners & InternalGET record/validateSearch πŸ“° πŸ”’Partners & InternalPUT imcc/v1/import/record/ πŸ“° πŸ”’Partners & InternalAdd a Video Player ⚑ πŸ”’Partners & InternalAdd an Audio Player ⚑ πŸ”’Partners & InternalAdd an Image Viewer ⚑ πŸ”’Partners & InternalMake a clip from a live feed in progress ⚑ πŸ”’Partners & InternalImagen Deployment Tutorial πŸ”’Partners & InternalWatchfolder Tutorial (Azure Function Media Uploaded Trigger) πŸ”’Partners & InternalWatchfolder Tutorial (Azure Function XML Uploaded Trigger) πŸ”’Partners & InternalOnboarding Playbook πŸ”’Partners & InternalJob and File Status Codes πŸ“„ πŸ”’Partners & InternalAdd a subtitles workflow to Imagen ⚑ πŸ”’Partners & InternalCreate a New Empty Workflow ⚑ πŸ”’Partners & InternalRest Plugin Setup for Vantage Integration πŸ‘©β€πŸ”¬ πŸ”’Partners & InternalWatch Folder With FTPS Tutorial πŸ‘¨β€πŸ« πŸ”’Partners & InternalXML Watch Folder Tutorial (Windows) πŸ”’Partners & Internal