'How do I add my client key and client secret into this python scripting to where it passes?
I am trying to access data from a website in which I have an API key and secret for using python. I am having trouble connecting to this API. I am positive that my API key and secret are correct.
My following code is:
import requests
import pandas as pd
import json
url = 'https://website/$export'
payload = {'******Client_Key*********':'**************Client_Secret*****************'}
r = request.get(url, params = payload)
This is the error: <Response [401]>
{'issue': [{'code': 'exception', 'details': {'coding': [{'code': 'Invalid Token', 'display': '', 'system': 'http://hl7.org/fhir/ValueSet/operation-outcome'}], 'text': ''}, 'severity': 'error'}], 'resourceType': 'OperationOutcome'}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
