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
+74-79Lines changed: 74 additions & 79 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,21 +33,20 @@ This document has four parts…
33
33
Your access secret allows you to call the Segment API and access customer data. We do not recommend exposing this key in client applications (see the end of this section for more details).
34
34
35
35
36
-
1.Head over to _Personas > Settings > Access Secrets_: `https://app.segment.com/<your-workspace>/personas/settings` (replace <your-workspace> with your own workspace).
37
-
2. Create your **Access Secret** with name, for e.g. `testing/development`
36
+
1. Go to _Personas > Settings > Access Secrets_: `https://app.segment.com/<your-workspace>/personas/settings` (replace <your-workspace> with your own workspace).
37
+
2.Create your **Access Secret** with name, for e.g. `testing/development`
38
38
39
-

39
+

40
40
41
-
3. Press Generate. Copy the resulting **Access Secret** and store it in a file on your computer as it's only shown once. You'll pass in the **Access Secret** into the Profile API for authorization (via the HTTP basic auth username).
42
-

41
+
3.Press Generate. Copy the resulting **Access Secret** and store it in a file on your computer as it's only shown once. You'll pass in the **Access Secret** into the Profile API for authorization (via the HTTP basic auth username).
42
+

43
43
44
-
4. Profile API request URLs require your space ID. For example:
44
+
4. Profile API request URLs require your space ID. For example:
Your namespace ID can be found here: [https://app.segment.com/goto-my-workspace/personas/spaces/default/settings/api-access](https://app.segment.com/goto-my-workspace/personas/spaces/default/settings/api-access)
47
48
48
-
Your namespace ID can be found here: [https://app.segment.com/goto-my-workspace/personas/spaces/default/settings/api-access](https://app.segment.com/goto-my-workspace/personas/spaces/default/settings/api-access)
49
-
50
-

49
+

51
50
52
51
53
52
**B. Find a user's external id**
@@ -60,26 +59,23 @@ Your namespace ID can be found here: [https://app.segment.com/goto-my-workspace/
60
59
61
60
**C. Query the user's event history**
62
61
63
-
1. Download and open [Postman](https://www.getpostman.com/), a nice app for exploring HTTP APIs
64
-
2. Create your Postman GET request to query the user's event's history:
The Segment API is organized around [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. [JSON](http://www.json.org/) is returned by all API responses, including errors.
145
139
@@ -184,12 +178,12 @@ Segment uses conventional HTTP response codes to indicate the success or failur
184
178
**Error Body**
185
179
186
180
```js
187
-
{
188
-
"error": {
189
-
"code":"validation_error",
190
-
"message":"The parameter `collection` has invalid character(s) `!`"
191
-
}
192
-
}
181
+
{
182
+
"error": {
183
+
"code":"validation_error",
184
+
"message":"The parameter `collection` has invalid character(s) `!`"
- Accept `user_id`, `email` or `anonymous_id` to fetch `favorite_blog_category` via API
633
-
- Return array of most recent posts of that category to render in recommended section
634
-
3.**Add recommended section to the blog**[Engineer]
635
-
- Client-side by making a request to `/recommended-posts` if it accepts CORS (recommended for static blogs, WordPress plugin, or other CMS solutions)
636
-
- Server-side by collecting all the personalizations you want to make on the blog in a single request to increase the total time to load (recommended for custom blog setup)
625
+
1.**Create a computed trait**`favorite_blog_category`**in Segment UI**[Marketer or Engineer]
- Accept `user_id`, `email` or `anonymous_id` to fetch `favorite_blog_category` via API
628
+
- Return array of most recent posts of that category to render in recommended section
629
+
3.**Add recommended section to the blog**[Engineer]
630
+
- Client-side by making a request to `/recommended-posts` if it accepts CORS (recommended for static blogs, WordPress plugin, or other CMS solutions)
631
+
- Server-side by collecting all the personalizations you want to make on the blog in a single request to increase the total time to load (recommended for custom blog setup)
637
632
638
633
Now, users who take a few minutes to read through an article on the blog will find posts recommended using their historical reading pattern including the post they just read.
0 commit comments