User Auth Issues with Python

Can anyone advise on a user auth error?  The goal is to export data using a Python script.  I get a successful 200 response when I run the following:

import requests

headers = {'X-PW-AccessToken': access_token, 'X-PW-Application': 'developer_api', 'X-PW-UserEmail':user_email, 'Content-Type': 'application/json'}
url = 'https://api.prosperworks.com/?'
r = requests.get(url, headers=headers)
print(r)

<Response [200]>

 

This version is modeled after an example in the API forum and returns 401-Unauthorized

headers = {'X-PW-AccessToken': access_token, 'X-PW-Application': 'developer_api', 'X-PW-UserEmail':user_email, 'Content-Type': 'application/json'}
url = 'https://api.prosperworks.com/developer_api/v1/activity_types'
r = requests.get(url, headers=headers)
print(r)

<Response [401]>

0
1

1 Comments

Please sign in to leave a comment.

Add Comment

Didn’t find what you were looking for?

Start a Discussion