You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/personas/profile-api.md
+19-7Lines changed: 19 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: Personas Profile API
4
4
5
5
6
6
> info "Plan Requirements"
7
-
> To use the Profile API, you'll need Personas Advanced on your plan.
7
+
> To use the Profile API, you'll need Personas Advanced on your plan.
8
8
9
9
The Segment Profile API provides a single API to read user-level and account-level customer data. Segment now allows you to query the entire user or account object programmatically, including the `external_ids` , `traits` , and `events` that make up a user's journey through your product.
10
10
@@ -40,28 +40,36 @@ This document has four parts…
40
40
41
41
Your access token enables you to call the Profile API and access customer data.
42
42
43
+
> info "European Union requirements"
44
+
> To implement the Profile API in the European Union, you must complete the following steps within an EU workspace. View the [regional Segment documentation](/docs/guides/regional-segment/#create-a-new-workspace-with-a-different-region) for more information.
45
+
43
46
1. Navigate to the API Access settings page *Personas > <personas_space> > Settings > API Access*.
44
47
45
48
2. Create your **Access Token** with a name that describes your use case, for example `testing/development`. Take note of the **space ID** value, you'll pass this into the Profile API request URL in a later step.
46
49
47
-

50
+

48
51
49
52
3. Click **Generate token**. Copy the resulting **Access Token** and store it in a file on your computer. You'll pass in the **Access Token** into the Profile API for authorization as an HTTP Basic Auth username in a later step.
50
-

53
+

51
54
52
55
53
56
### Find a user's external id
54
57
55
58
1. Navigate to Personas > *personas_space* > Explorer and select the user you want to query through the API.
56
59
2. Take note of the user's available identifiers. For example, this user has a `user_id` with the value `9800664881`. The Profile API requires both the type of ID and the value separated by a colon. For example, `user_id:9800664881`.
57
-

60
+

58
61
59
62
### Query the user's event traits
60
63
61
64
1. From the HTTP API testing application of your choice, configure the authentication as described above.
62
65
2. Prepare the request URL by replacing `<space_id>` and `<external_id>` in the request URL:
@@ -142,14 +150,18 @@ The Segment API is organized around [REST](http://en.wikipedia.org/wiki/Represen
142
150
143
151
https://profiles.segment.com
144
152
153
+
**European Union endpoint**
154
+
155
+
https://profiles.euw1.segment.com
156
+
145
157
146
158
### Authentication
147
159
148
-
The Profile API uses basic authentication for authorization — with the **Access Token** as the authorization key. Your **Access Token** carries access to all of your customer data, so be sure to keep them secret! Do not share your Access Token in publicly accessible areas such as GitHub or client-side code.
160
+
The Profile API uses basic authentication for authorization — with the **Access Token** as the authorization key. Your **Access Token** carries access to all of your customer data, so be sure to keep them secret. Do not share your Access Token in publicly accessible areas such as GitHub or client-side code.
149
161
150
162
You can create your Access Secret in your Personas Settings page. Segment recommends that you name your tokens with the name of your app and its environment, such as `marketing_site/production`. Access tokens are shown once — you won't be able to see it again. In the event of a security incident, you can revoke and cycle the access token.
151
163
152
-

164
+

153
165
154
166
155
167
When you make requests to the Profile API, use the Access Token as the basic authentication username and keep the password blank.
0 commit comments