Skip to content

Commit 27b146c

Browse files
authored
Merge pull request #5031 from segmentio/spencerattick-patch-2
include Function authorization example
2 parents 4aaa361 + 6b07bd9 commit 27b146c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/unify/profile-api.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,15 @@ When you make requests to the Profile API, use the Access Token as the basic aut
169169
curl https://profiles.segment.com/v1/spaces/<space_id>/collections/users/profiles
170170
-u $SEGMENT_ACCESS_TOKEN:
171171
```
172+
If you're using a Segment Function or Node.js you can format your header object to include authentication, like so:
172173

174+
```
175+
headers: {
176+
'Content-Type': 'application/json',
177+
Authorization:
178+
`Basic ${btoa('<access_token>' + ':')}`,
179+
}
180+
```
173181

174182
### Errors
175183

0 commit comments

Comments
 (0)