Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

add bearer token in python request

import requests

auth_token='sdfghjkloerdtfyguhiopfghjkl;fghjkl'
hed = {'Authorization': 'Bearer ' + auth_token}
data = {'app' : 'aaaaa'}

url = 'https://api.xy.com'
response = requests.post(url, json=data, headers=hed)
print(response)
print(response.json())
 
PREVIOUS NEXT
Tagged: #add #bearer #token #python #request
ADD COMMENT
Topic
Name
8+5 =