Skip to content

Commit 3168e4e

Browse files
authored
Merge pull request #421 from segmentio/repo-sync
repo sync
2 parents e27c86c + d5cdcd8 commit 3168e4e

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

src/personas/profile-api.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Personas Profile API
44

55

66
> 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.
88
99
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.
1010

@@ -40,28 +40,36 @@ This document has four parts…
4040

4141
Your access token enables you to call the Profile API and access customer data.
4242

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+
4346
1. Navigate to the API Access settings page *Personas > <personas_space> > Settings > API Access*.
4447

4548
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.
4649

47-
![](images/1516309197043.png)
50+
![Generating an API access token in Personas](images/1516309197043.png)
4851

4952
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-
![](images/1526362840437.png)
53+
![Copying an API access token in Personas](images/1526362840437.png)
5154

5255

5356
### Find a user's external id
5457

5558
1. Navigate to Personas > *personas_space* > Explorer and select the user you want to query through the API.
5659
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-
![](images/profile_api_user_id.png)
60+
![Retrieving a user's identifiers with the Personas Explorer](images/profile_api_user_id.png)
5861

5962
### Query the user's event traits
6063

6164
1. From the HTTP API testing application of your choice, configure the authentication as described above.
6265
2. Prepare the request URL by replacing `<space_id>` and `<external_id>` in the request URL:
6366
`https://profiles.segment.com/v1/spaces/<your-namespace-id>/collections/users/profiles/<external_id>/traits`
64-
3. Send a GET request to the URL.
67+
68+
69+
If you're using the Profile API in the EU, use the following URL for all requests:
70+
71+
`https://profiles.euw1.segment.com/v1/spaces/<your-namespace-id>/collections/users/profiles/<external_id>/traits`
72+
3. Send a `GET` request to the URL.
6573

6674
### Explore the user's traits in the response
6775

@@ -142,14 +150,18 @@ The Segment API is organized around [REST](http://en.wikipedia.org/wiki/Represen
142150

143151
https://profiles.segment.com
144152

153+
**European Union endpoint**
154+
155+
https://profiles.euw1.segment.com
156+
145157

146158
### Authentication
147159

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.
149161

150162
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.
151163

152-
![](images/1515109834051.png)
164+
![Copying an API access token in Personas](images/1515109834051.png)
153165

154166

155167
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

Comments
 (0)