What I’m trying to do:
Trying to access the Garmin inreach inbound API, which requires basic HTTP authentication.
What I’ve tried and what’s not working:
I’ve successfully done this in stock python using the following code, but can’t figure out how to successfully translate this into an anvil.http request and could do with some help. TIA!
Code Sample:
# this is a formatted code snippet.
# paste your code between ```
auth = requests.auth.HTTPBasicAuth('username', 'password')
response = requests.post(url="https://eur-origin.explore.garmin.com:443/ipcinbound/V1/Tracking.svc/Tracking",
json = payload_dict,
auth=auth)
r = response.status_code
if r ==200:
return True
else:
return r
Clone link:
share a copy of your app