Skip to content

Commit e5c8223

Browse files
Update api-proxy.mdx
1 parent 413d902 commit e5c8223

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docs-v2/pages/connect/api-proxy.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ const resp = await pd.makeProxyRequest(
100100
options: {
101101
method: "POST",
102102
headers: { // These get sent to the downstream API
103-
authorization: "Bearer {{oauth_access_token}}", // Include the special {{ oauth_access_token }} macro
104103
hello: "world!"
105104
},
106105
body: {
@@ -136,9 +135,15 @@ You can also send a request to the Connect REST API with the below config:
136135

137136
- If using the REST API, include the `Authorization` header with your Pipedream OAuth access token (`Bearer {access_token}`)
138137
- Headers that contain the prefix `x-pd-proxy` will get forwarded to the downstream API
138+
- If the downstream API requires [custom authorization headers](#authenticating-on-behalf-of-a-user), make sure to prepend with `x-pd-proxy` and include the macro `{{ }}` that Pipedream will replace with the actual value. For example,
139+
140+
```javascript
141+
"x-pd-proxy-apiKey: {{api_key}}"
142+
```
139143

140144
```bash
141-
# First, obtain an OAuth access token
145+
# First, obtain an OAuth access token to authenticate to the Pipedream API
146+
142147
curl -X POST https://api.pipedream.com/v1/oauth/token \
143148
-H "Content-Type: application/json" \
144149
-d '{

0 commit comments

Comments
 (0)