← Back to Home

Bearer Token Auth

/bearer
Tests Bearer token authentication.

Parameters

Authorization header
Bearer token in Authorization header

Examples

curl
curl -H "Authorization: Bearer mytoken123" https://tcpdata.com/bearer
JavaScript (fetch)
fetch('https://tcpdata.com/bearer', {
  headers: {
    'Authorization': 'Bearer mytoken123'
  }
})
  .then(res => res.json())
  .then(data => console.log(data));
Python (requests)
import requests

headers = {'Authorization': 'Bearer mytoken123'}
response = requests.get('https://tcpdata.com/bearer', headers=headers)
print(response.json())