Skip to content

Commit 512fc50

Browse files
authored
Fixing OAuth nesting
1 parent 7a1cecc commit 512fc50

File tree

1 file changed

+26
-26
lines changed
  • src/connections/sources/catalog/libraries/server/python

1 file changed

+26
-26
lines changed

src/connections/sources/catalog/libraries/server/python/index.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -530,37 +530,13 @@ analytics.write_key = 'YOUR_WRITE_KEY'
530530

531531
## Google App Engine
532532

533-
Google App Engine my not resolve project dependencies. If this is the case add the following to your project alongside analytics-python:
533+
Google App Engine may not resolve project dependencies. If this is the case add the following to your project alongside analytics-python:
534534
- [requests](https://github.com/kennethreitz/requests){:target="_blank"}
535535
- python-dateutil](https://github.com/paxan/python-dateutil){:target="_blank"}
536536

537537
If you're having issues with threads outliving your request, check [Background threads and synchronous mode](#background-threads-and-synchronous-mode)
538538

539-
## Troubleshooting
540-
541-
### Request size limits
542-
543-
{% include content/tracking-api-limit.md %}
544-
545-
546-
{% include content/troubleshooting-intro.md %}
547-
{% include content/troubleshooting-server-debugger.md %}
548-
{% include content/troubleshooting-server-integration.md %}
549-
550-
### Override context value
551-
552-
In some cases, you will want to manually pass in `ip` or `userAgent` values. Since Segment does not automatically send these, you can pass these through the `context` object as follows:
553-
554-
```python
555-
analytics.track('9742', 'Song Played', context={
556-
'ip': 1234,
557-
'userAgent': 'Mozilla/5.0 (Linux; U; Android 4.1.1; en-gb; Build/KLP) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30'
558-
})
559-
```
560-
561-
Be sure to see the full [reference of supported keys](/docs/connections/spec/common/#context).
562-
563-
### OAuth 2.0
539+
## OAuth 2.0
564540

565541
Enable [OAuth 2.0](/docs/connections/oauth/) in your Segment workspace to guarantee authorized communication between your server environment and Segment's Tracking API. To support the non-interactive server environment, the OAuth workflow used is a signed client assertion JWT.
566542

@@ -594,6 +570,30 @@ analytics.track('AUser', 'track')
594570
analytics.flush()
595571
```
596572

573+
## Troubleshooting
574+
575+
### Request size limits
576+
577+
{% include content/tracking-api-limit.md %}
578+
579+
580+
{% include content/troubleshooting-intro.md %}
581+
{% include content/troubleshooting-server-debugger.md %}
582+
{% include content/troubleshooting-server-integration.md %}
583+
584+
### Override context value
585+
586+
In some cases, you will want to manually pass in `ip` or `userAgent` values. Since Segment does not automatically send these, you can pass these through the `context` object as follows:
587+
588+
```python
589+
analytics.track('9742', 'Song Played', context={
590+
'ip': 1234,
591+
'userAgent': 'Mozilla/5.0 (Linux; U; Android 4.1.1; en-gb; Build/KLP) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30'
592+
})
593+
```
594+
595+
Be sure to see the full [reference of supported keys](/docs/connections/spec/common/#context).
596+
597597
### Versioning
598598

599599
Check that you have the most recent version.

0 commit comments

Comments
 (0)