Téléchargement d'icônes et de logos

Pour ajouter des icônes et des logos à un thème, ils doivent d'abord être téléchargés dans le seau AWS de l'API Meetings, puis associés au thème correspondant. le thème correspondant. Vous devez également vous assurer que vos logos et favicons respectent les exigences en matière d'images ci-dessous.

Exigences

Le type d'images doit être téléchargé en fonction de la couleur de l'arrière-plan. Les images colorées doivent être utilisées sur un fond clair, tandis qu'une image plus claire doit être utilisée sur un fond foncé.

Exigences en matière de logo :

  • Format : PNG
  • Taille maximale : 1 Mo
  • Dimensions : 1 px - 300 px
  • L'arrière-plan doit être transparent

Exigences en matière de Favicon :

  • Format : PNG
  • Taille maximale : 1 Mo
  • Dimension : 16 x 16 - 32 x 32 et doit être de forme carrée
  • L'arrière-plan doit être transparent

Unlike Server SDKs, the process requires 3 steps with cURL.

1. Retrieve Upload Credentials

Example Request

Use a

GET
request to retrieve the credentials needed to upload your images to AWS. The response will contain objects for each favicon, light logo, and colored logo, and the Policy will be your JWT. Grab the values for the image type you wish to upload.

curl -X GET https://api-eu.vonage.com/v1/meetings/themes/logos-upload-urls \ -H "Authorization: Bearer "$JWT

Example Response

{
  "url": "https://s3.amazonaws.com/roomservice-whitelabel-logos-prod",
  "fields": {
    "Content-Type": "image/png",
    "key": "auto-expiring-temp/logos/white/a2ef0569-7d2c-4297-b0dd-1af6d8b61be6",
    "logoType": "white",
    "bucket": "roomservice-whitelabel-logos-prod",
    "X-Amz-Algorithm": "AWS4-HMAC-SHA256",
    "X-Amz-Credential": "ASIA5NAYMMB6AP63DGBW/20220410/us-east-1/s3/aws4_request",
    "X-Amz-Date": "20220410T200246Z",
    "X-Amz-Security-Token": "XXXXX",
    "Policy": "XXXXX",
    "X-Amz-Signature": "fcb46c1adfa98836f0533aadebedc6fb1edbd90aa583f3264c0ae5bb63d83123"
  }
}

2. Upload Your File to AWS

Copy all values from the response above for the image type you wish to upload, and paste them in the body of this request. Add the file path to your image as well.

curl -X POST 'https://s3.amazonaws.com/roomservice-whitelabel-logos-prod' \ --H 'Content-Type: multipart/form-data' \ -F 'Content-Type="image/png"' \ -F 'key="auto-expiring-temp/logos/white/a2ef0569-7d2c-4297-b0dd-1af6d8b61be6"' \ -F 'logoType="white"' \ -F 'bucket="roomservice-whitelabel-logos-prod"' \ -F 'X-Amz-Algorithm="AWS4-HMAC-SHA256"' \ -F 'X-Amz-Credential="ASIA5NAYMMB6AP63DGBW/20220410/us-east-1/s3/aws4_request"' \ -F 'X-Amz-Date="20220410T194523Z"' \ -F 'X-Amz-Security-Token="XXXXX"' \ -F 'Policy="XXXXX"' \ -F 'X-Amz-Signature="fcb46c1adfa98836f0533aadebedc6fb1edbd90aa583f3264c0ae5bb63d83123"' \ -F 'file=@"{PATH_TO_FILE}"'

This will return a 204 if successful. If you get an error like "Check your key and signing method", check the spaces and formatting of the message body.

3. Add Keys to Theme

Use the theme ID of the theme you wish to update, along with the key used in the previous step, to link the logo with the theme that you wish to update. You can even make multiple upload calls, and then pass multiple keys to the theme update.

Once the images are associated with a theme, you'll be able to see their details reflected in the response of a theme

. The brand_image_colored_url, brand_image_white_url and branded_favicon_url values will contain the AWS Bucket Key, and their respective URLs will point to the image itself.

curl -X PUT 'https://api-eu.vonage.com/v1/meetings/themes/e8b1d80b-8f78-4578-94f2-328596e01387/finalizeLogos' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer '$JWT \ -d '{ "keys": [ "{white-logo-key}", "{colored-logo-key}", "{favicon-key}" ] }'

Référence