Skip to content

Commit e0db3f8

Browse files
author
Yuriy Tolstykh
authored
feat: [warehouse] adding auth to warehouse connectors (#1329)
* adding auth to warehouse connectors * removing blank lines
1 parent 3470e84 commit e0db3f8

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: "Authentication"
3+
slug: "warehouse-connectors-api-authentication"
4+
hidden: false
5+
createdAt: "2024-08-08T19:31:43.295Z"
6+
updatedAt: "2024-08-08T19:31:43.295Z"
7+
categorySlug: "warehouse-connectors-api"
8+
---
9+
10+
A [service account](https://developer.mixpanel.com/reference/service-accounts) is necessary to authenticate Warehouse Connectors API requests. Once you have created a service account and obtained your user name and secret, you can make a request to trigger a warehouse import.
11+
12+
```bash cURL Basic Auth
13+
curl -X PUT https://mixpanel.com/api/app/projects/<your_project_id>/warehouse-sources/imports/<your_import_id>/manual-sync \
14+
--user "<serviceaccount_username>:<serviceaccount_secret>"
15+
```
16+
```shell cURL Header
17+
curl -X PUT https://mixpanel.com/api/app/projects/<your_project_id>/warehouse-sources/imports/<your_import_id>/manual-sync \
18+
--header 'authorization: Basic <serviceaccount_username>:<serviceaccount_secret>'
19+
```
20+
```python Python Requests
21+
import requests
22+
requests.put(
23+
'https://mixpanel.com/api/app/projects/<your_project_id>/warehouse-sources/imports/',
24+
auth=('<serviceaccount_username>', '<serviceaccount_secret>'),
25+
)
26+
```

0 commit comments

Comments
 (0)