googleGCP GCS

This takes about 10 minutes to set up end-to-end.

This guide explains how to connect GCP Cloud Storage to the Weekerp API.

It includes the full process of creating credentials and registering them in Weekerp.

Required information for connection

To allow Weekerp to access your images, you need to provide the following:

  • service account key (JSON)

    • Client email

    • Project Id

    • private key

  • bucket name

Getting credentials (GCP)

If you’re not familiar with GCP, we recommend creating a new read-only Service Account so Weekerp can read images from your bucket.

  1. Open the GCP Console → Service AccountsCreate service account

  2. Enter a Service Account name (e.g., weekerp-cdn-reader) → Create and Continue

  3. Set the role → search/select Storage Object ViewerDone

  4. Select the created Service Account → Keys tab → Add KeyCreate new keyJSONCreate

  5. Save the downloaded JSON key file (do not share externally).

  6. In the GCP Console → Buckets, confirm the Bucket name to connect.

  7. In Weekerp → SourcesAdd SourceGoogle Cloud Storage (GCS)

  8. Enter the Bucket name + upload the JSON key fileNext

  9. Enter an Alias and create it to add the source.

Below is the same guide shown in images.

1. Search for “Service Accounts” in the GCP Console

2. Click “Create service account”

3. Create a Service Account

  1. Enter weekerp-cdn-reader (you can change this)

  2. Click Create and Continue

4. Grant permissions to the account, and open the Role dropdown

5. Search and assign Storage Object Viewer

  1. Search for Storage Object Viewer

  2. Click Storage Object Viewer at the top of the results

6. Finish granting permissions

  1. Click Done

7. Verify the created account and open its details

  1. Confirm the created account

  2. Click the account name

8. Create a key (JSON)

  1. Click the Keys tab

  2. Click Add Key

  3. From the dropdown, click “Create new key”

9. Select the key type

  1. Choose JSON

  2. Click Create (bottom-right)

10. Verify the downloaded key file (.json)

After downloading the JSON file, you’ll receive a key like the following (do not share externally).

11. Search for Buckets in the GCP Console (to confirm the bucket name)

12. Confirm the Bucket name

  1. Example: weekerp-test-2

13. You should have the following information ready:

  1. Credential JSON file (Step #10)

  2. Bucket name (Step #12)

14. In Weekerp, click Add Source (top-right)

  1. Open Weekerp

  2. Click the Source tab

  3. Click Add Source

image.png

15. Select Google Cloud Storage

image.png

16. Enter credential information

  1. Enter the Bucket name

  2. Upload the JSON file

Frame 7.png

circle-info

BasePath sets the root directory for origin requests.

If your files are stored like below, you can set BasePath to / or /assets.

  • /dog.jpg

  • /assets/cat.png

Request example

  • cdn.weekerp.com/image/{alias}/dog.jpg

Origin request

  • With BasePath set: https://static.example.com/assets/dog.jpg

  • Without BasePath: https://static.example.com/dog.jpg

For more details, please refer to BasePath.

17. Review the entered information

  1. Confirm the details

  2. Click Next

image.png

18. Enter the source alias

  1. Enter the alias you want to use

  2. Create the alias

image.png

19. Verify the created data source

image.png

Use it like this:

cdn.weekerp.com/image/weekerp-assets/dog.jpg

cdn.weekerp.com/image/weekerp-assets/dog.jpg?ai=Rotate the image to the right

cdn.weekerp.com/video/weekerp-assets/test-video.mp4

All settings are complete.

In general, it takes about 5–10 minutes to propagate the connection across all global environments.

Last updated