Skip to content

Commit 281d3e9

Browse files
committed
Vale edits
1 parent 9f7d1c9 commit 281d3e9

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/partners/enable-with-segment.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ As a partner developing an integration using Segment's Config API, everything st
1414

1515
As a destination partner, you may only manage your own destination on the workspace and source authorized by the user.
1616

17-
### App Installs
17+
### App installs
1818

1919
Segment Workspace Owners authorize your App on their workspace using a web-based authorization flow, exactly like OAuth. When authorized, Segment creates an **App Install** on the workspace.
2020

2121
Therefore, the token returned by Segment isn't tied to a user – it's tied to an App Install.
2222

23-
## Set up Guide
23+
## Set up guide
2424

2525
There are three steps to implement an "Enable with Segment" OAuth flow:
2626

@@ -35,21 +35,21 @@ There are three steps to implement an "Enable with Segment" OAuth flow:
3535
![Step 1](images/enable-with-segment/step1.png)
3636
3. Name your App, and click **Create**.
3737
![Step 2](images/enable-with-segment/step2.png)
38-
You'll be redirected to your App's main page. If you are implementing Enable with OAuth for an integration not built using the Developer Center and encounter an issue where your integration's name is already taken, you may choose another name (eg. TOOLNAME-enable). You will have the option to connect the two by selecting a scope in Step #2.
38+
You'll be redirected to your App's main page. If you are implementing Enable with OAuth for an integration not built using the Developer Center and encounter an issue where your integration's name is already taken, you may choose another name (for example, TOOLNAME-enable). You will have the option to connect the two by selecting a scope in Step #2.
3939
4. Click the `App Info` tab.
4040
![Step 3](images/enable-with-segment/step3.png)
4141
5. From the `App Info` tab, click `OAuth` in the left side navigation.
4242
![Step 4](images/enable-with-segment/step4.png)
43-
6. Keep your Developer Center browser window open – we'll need the OAuth credentials on this page to set up an OAuth consumer.
43+
6. Keep your Developer Center browser window open – Segment needs the OAuth credentials on this page to set up an OAuth consumer.
4444
![Step 5](images/enable-with-segment/step5.png)
4545

4646
### 2. Set up an OAuth consumer
4747

48-
> For this step, we reference our example OAuth consumer at https://github.com/segmentio/partnerapp.
48+
> For this step, reference Segment's example OAuth consumer at https://github.com/segmentio/partnerapp.
4949
>
50-
> You should adapt our example to your own infrastructure.
50+
> You should adapt Segment's example to your own infrastructure.
5151
52-
1. Clone our `partnerapp` repo:
52+
1. Clone Segment's `partnerapp` repo:
5353
```sh
5454
git clone https://github.com/segmentio/partnerapp
5555
```
@@ -66,17 +66,17 @@ There are three steps to implement an "Enable with Segment" OAuth flow:
6666
4. Optionally set a new scope. The options, from most to least restrictive are:
6767
* `destination/<SLUG>` (e.g. `destination/airship`) -- create or update a single destination type on a single source a user consents to. This allows you to manage a secret like `apiKey` on your company's destination automatically but nothing else. Note that you may need to update the scope to the right destination slug if your app name differs.
6868
* `workspace:read` -- read-only access to all the settings and metadata on a single workspace a user consents to. This allows you to build integrations like a dashboard that gets and displays a workspace event delivery metrics
69-
* `workspace` -- full acess to all the settings on a single workspace a user consents to. This allows you to build deep integrations that create sources, destinations and more.
69+
* `workspace` -- full access to all the settings on a single workspace a user consents to. This allows you to build deep integrations that create sources, destinations, and more.
7070
5. Finally, create a component of your choice in Developer Center.
7171
![Step 8](images/enable-with-segment/step8.png)
7272

7373
> You generally will create a component and build a flow to create an Install of your app. However you can also build a flow to create an install of an existing destination by changing the OAuth scope.
7474
7575
### 3. Run through an example OAuth flow
7676

77-
> For this step, we reference our example OAuth consumer at https://github.com/segmentio/partnerapp.
77+
> For this step, reference Segment's example OAuth consumer at https://github.com/segmentio/partnerapp.
7878
>
79-
> You should adapt our example to your own infrastructure.
79+
> You should adapt Segment's example to your own infrastructure.
8080
8181
1. Back in the root directory of your `partnerapp` clone, update the following two pieces of configuration in `index.js`:
8282
```js
@@ -93,22 +93,22 @@ There are three steps to implement an "Enable with Segment" OAuth flow:
9393
```sh
9494
node index.js
9595
```
96-
3. Navigate through our login and authorize OAuth flows:
96+
3. Navigate through Segment's login and authorize OAuth flows:
9797
![Step 9](images/enable-with-segment/step9.png)
9898
4. Look for a JSON response in your browser window, and output in the terminal running `partnerapp`:
9999
![Step 10](images/enable-with-segment/step10.png)
100100
![Step 11](images/enable-with-segment/step11.png)
101101

102-
## OAuth Implementation
102+
## OAuth implementation
103103

104104
If you use a standard OAuth library in your programming language, all of this is done for you as shown in the [setup guide](#set-up-guide). These steps are just for illustration.
105105

106106
1. When the user wants to authenticate, you redirect them to `https://id.segmentapis.com/oauth2/auth?response_type=code&scope=workspace:read&client_id=...`.
107-
> **Note**: We only accept `response_type=code` here. That means Segment returns an `auth_code` that your library exchanges for an install token in Step 5 below.
107+
> **Note**: Segment only accepts `response_type=code` here. That means Segment returns an `auth_code` that your library exchanges for an install token in Step 5 below.
108108
2. If the user is logged out, Segment redirects to `https://app.segment.com/login`
109109
3. If the user is logged in, Segment redirects to `https://app.segment.com/authorize`
110110
4. If user consents, Segment redirects with a code to your redirect_uri `http://localhost:8888/auth/segment/callback`. This app listens for this request and runs step #5 below.
111-
5. You exchange the code with for an install token from `https://id.segmentapis.com/oauth2/token`. The body of this POST request should include the code you received and your `redirect_uri`. Include your client secret and client id in a basic authorization header.
111+
5. You exchange the code for an install token from `https://id.segmentapis.com/oauth2/token`. The body of this POST request should include the code you received and your `redirect_uri`. Include your client secret and client id in a basic authorization header.
112112
6. You save the access token, install name, workspace name and source name for the user.
113113

114114
At the end of a successful flow you get an "Install Token". If you passed in the scope as `destination/clearbrain` the user is prompted to select a source on which to install your Enable With Segment App, and that source is returned to you as well.
@@ -130,7 +130,7 @@ You can then perform API operations as the installed app on behalf a user.
130130

131131
With the `destination/clearbrain` scope you can only change the destination specified (`clearbrain` in this case) on the user selected source. This is the recommended scope for apps trying to control just one destination for a user (Enable With Segment functionality). These apps can only access the Destinations API. You can find a detailed reference here: https://reference.segmentapis.com/ > Destinations
132132

133-
You can GET a destination if it exists (and you have access to the user workspace and source) as shown below. You can also Create, Update or Delete it too.
133+
You can GET a destination if it exists (and you have access to the user workspace and source) as shown below. You can also Create, Update, or Delete it too.
134134

135135
```sh
136136
$ INSTALL_TOKEN=YL8a0w-Boz1EgZgmD2ELZvsxakjqSMwO8xe7tV-ToSk.nKaLX2QHocqalHR3O4BdoYdcopk3hjW4izYHMG14cxQ
@@ -179,7 +179,7 @@ $ curl \
179179
}
180180
```
181181

182-
## Advanced Use Cases
182+
## Advanced use cases
183183

184184
> Developer Center Destinations must use their specific destination scope for their enable flows. More permissive apps are subject to revocation unless specifically approved. If you've been approved, however, this section may apply.
185185
@@ -254,7 +254,7 @@ If you created the app with the `destination/<slug>` scope, you can only access
254254

255255
### How do I create or update a destination that requires more configuration than just a API Key?
256256

257-
`GET` the destination settings using our catalog API first. This shows all of the fields the destination supports. You can then substitute the field values for the ones you need to specify.
257+
`GET` the destination settings using Segment's catalog API first. This shows all of the fields the destination supports. You can then substitute the field values for the ones you need to specify.
258258

259259
Using this body, craft a `CREATE` request and substitute the appropriate field values. Check out https://reference.segmentapis.com/ > Destination > CREATE request for an example
260260

@@ -280,19 +280,19 @@ Your `redirect_uri` probably doesn't match what you set in the App Create Reques
280280

281281
### How many redirect_uris can I have? Can I add more after the app is created?
282282

283-
You can have five `redirect_uris` on app creation. Editing the app info directly is not supported at this time. [contact us](https://segment.com/help/contact/) if you want any of your `redirect_uris` or other info changed.
283+
You can have five `redirect_uris` on app creation. Editing the app info directly is not supported at this time. [contact Segment](https://segment.com/help/contact/) if you want any of your `redirect_uris` or other info changed.
284284

285285
In the future we will allow you to update this information on your own.
286286

287287
### I am getting "malformed token" when I try to access the API. What is wrong?
288288

289-
- Tokens expire every hour, so your token might have expired. To get a new access_token, hit the refresh endpoint. Make sure you pass in the correct `install_name`, `client_id` and `client_secret` in that request.
289+
- Tokens expire every hour, so your token might have expired. To get a new access_token, hit the refresh endpoint. Make sure you pass in the correct `install_name`, `client_id`, and `client_secret` in that request.
290290

291291
- You might not have permissions for the action you're trying to take. You can only write to a resource when you have `workspace:read` permission. If you need write access, then create a new app with `workspace` permission and then re-install it.
292292

293293
### Do you send CSRF state back when you redirect?
294294

295-
Yes. If you set the `state=123` parameter in your initial request, we send it back to you.
295+
Yes. If you set the `state=123` parameter in your initial request, Segment sends it back to you.
296296

297297
### Do we still have to send the redirect_uri in the oauth2/token request?
298298

0 commit comments

Comments
 (0)