Figuring out NetOauth in Nettalk

Hi all!

Topic - NetWebClient and NetOauth

I have a program making calls to various API endpoints, all functioning correctly/acceptably. Now, I’m trying to retrieve tweets from Twitter. I have a developer’s account and basic subscription access. I’m new to using Oauth1 for authentication. I’ve set statements up in Insomnia and am successfully retrieving tweets and other data. However, transitioning this all to Clarion is (for me) challenging with respect to Oauth1 (which I want to continue with for authentication).

I’ve shared screenshots here of the Insomnia GET request with some data obscured to demonstrate successful data retrieval. There’s a screenshot of Clarion showing the code where I’ve populated oauth parameters. This area confuses me. I’m essentially fumbling with the oauth aspect.

I’ve also included a screenshot of the textual data returned.

Any feedback, guidance, or direction that could help get this ironed out would be greatly appreciated. While oauth is daunting for me, I’m hopeful someone can see where I’m off track.

FWIW, I’ve posted this same message (a little earlier today) to Nettalk central.



1 Like

Have you read this and does it make sense?

I have not. Thank you for sending it through. I’ll review it. I expect I will have questions. Thank you again.

What can be confusing is reading docs on OAuth flow, and understanding it as a multi‐strp process. Whereas NetTalk requires just a single group passed into OauthLogin and thats all (from a coding point of view.)

I strongly recommend working through the NetTalk documentaion, and taking a bit of time to experiment with a known Oauth target, like Onedrive or whatever. This will help you to familiarize the process of registering your app, and what setting goes where.

We also walk-through new services from time to time in the User Group (every thursday see clarionlive.com ) because each service has a unique web interface. I know its not ideal timing for you, but thats likely worth the effort.

Thanks, Bruce. As an interim solution/measure, I’ve written a Python script that fetches the tweets and saves them (JSON) to a text file. The script has the consumer key and secret, and the access token and secret, included in the script. I’m aware, I’m guessing, this is far from ideal. This is a single user app, me, on my desktop. From the Clarion app, I use RUN to execute the script as part of a cycle (a “step machine” is how you referred to it, if I recall, when I asked you a question about this sometime ago) of other processes. That will get me through the hurdle of, and the desire to, get something up and running… while I work to figure out how to do this within the Clarion program itself.

… Or just create technical debt.

What’s throwing me off is that I already have, via the Twitter developer site, the consumer and access tokens/codes. I don’t need to go out, or I’m thinking I don’t need to go out, to another service to get them. They’ve already been established. I’m probably missing something fundamental.