DEV Community

Arthur Benjamin
Arthur Benjamin

Posted on

Running Osintgram with HikerAPI on a Termux Freestyle VM

Running Osintgram with HikerAPI on a Termux Freestyle VM

I recently spent some time testing Osintgram inside a Freestyle VM accessed through Termux on Android, with HikerAPI handling the Instagram API side.

At first, the setup was a little confusing because several API-related packages are involved. I initially focused on the "hikerapi" Python package and its "Client" class, but after looking through the Osintgram source, I noticed that other API components are also present.

The important part I found was the HikerAPI integration in "src/hikercli.py". This is where the HikerAPI client is configured with an access token.

Testing authentication

One of the useful parts of troubleshooting was seeing how the error changed as the configuration became more correct.

Initially, I received an unauthorized-request error. After fixing the token configuration, the error changed to a message indicating that the HikerAPI account needed additional credit.

That distinction was helpful. It meant the Python environment and authentication setup were reaching HikerAPI successfully, and the remaining problem was related to the account rather than the installation itself.

Simple API test

Before troubleshooting the entire Osintgram setup, I also tested a basic request separately:

import requests

headers = {"x-access-key": "YOUR_KEY"}

response = requests.get(
"https://api.hikerapi.com/v2/user/by/username?username=natgeo",
headers=headers
)

print(response.json())

Using a separate request like this made it easier to determine whether a problem was coming from HikerAPI itself or from the Osintgram configuration.

What I learned

The biggest lesson from this setup was not to assume that the Python package you install is necessarily the only API component Osintgram is using.

Looking at the source code was much more useful than checking installed packages alone. It helped me identify where the HikerAPI client was actually being initialized and made the authentication problem easier to understand.

I'm still testing the setup and learning how the different components work together inside the Freestyle VM.

If you've worked with HikerAPI, Osintgram, or Python API integrations on Android/Termux, I'd be interested to hear what setup worked for you.

Top comments (1)

Collapse
 
arthur_benjamin_bd8cfc44e profile image
Arthur Benjamin

Running Osintgram with HikerAPI on a Termux Freestyle VM