Hi Paul

Sorry only just got around to your email in my inbox! Do you have a link to the 
API documentation? or if not, as well as the token end point in your code 
(/rest/api/token/) do you also have an authorisation end point?

Regards

Chris.



-----Original Message-----
From: ProfoxTech <profoxtech-boun...@leafe.com> On Behalf Of Paul H. Tarver
Sent: 12 July 2022 20:13
To: profoxt...@leafe.com
Subject: RE: Need Help - Foxpro & Chilkat & Rest API

I started reading Rick's material yesterday and it definitely helped me get to 
the point of getting an OAuth2.0 token back. I just need to get back and finish 
reading his work and the API documentation (which is definitely not written for 
VFP!) and maybe it will help me understand how to convert the Postman 
information into VFP code which calls Chilkat tools to accomplish building the 
data requests. I got the token request and a data request functioning in 
Postman first which did help but none of the code examples are from a VFP point 
of view, so I'm having to translate their code into something I can use in VFP 
with Chilkat. I'm pretty sure I can handle the extraction of the data from the 
responses. In fact, I ran into a situation yesterday where the Chilkat LoadJson 
function wasn't working right and it turned out the token response didn't match 
the layout Chilkat expects. So, I just used VFP Alines() to break apart the 
Json elements which worked quite nicely.

Getting my head wrapped around the formation of the API requests is without a 
doubt the hardest part of this. However, trying to learn Chilkat + API at the 
same time is making the process more complicated I think. That's why I was 
hoping to get some other sample code to review since Chilkat's examples are 
mostly for specific published API's and do not use a more generalized approach. 
At least I figured out yesterday how to use Chilkat to get more useful feedback 
from the API server than just the 400 error so that has been helpful. 

Paul H. Tarver
Tarver Program Consultants, Inc.


-----Original Message-----
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard Kaye
Sent: Tuesday, July 12, 2022 10:54 AM
To: profoxt...@leafe.com
Subject: RE: Need Help - Foxpro & Chilkat & Rest API

That was the 30,000 for view, of course. 😊

Gotta get your head wrapped around the requirements of the API you’re calling. 
What I’m referring to is the architecture of the internal APIs written by my 
engineering team here. There are a couple of different flavors and the token 
handling isn’t consistent between the two. I really did find that going through 
Rick’s tutorials were very helpful since it’s got the VFP perspective.

--

rk

From: ProfoxTech <profoxtech-boun...@leafe.com> On Behalf Of Paul H. Tarver
Sent: Tuesday, July 12, 2022 11:19 AM
To: profoxt...@leafe.com
Subject: RE: Need Help - Foxpro & Chilkat & Rest API

I wish it was as easy to program as it was to read your explanation! :)

But I guess if it were really easy, then everyone would be learning to code.
:)

Paul H. Tarver
Tarver Program Consultants, Inc.


-----Original Message-----
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard Kaye
Sent: Tuesday, July 12, 2022 9:20 AM
To: profoxt...@leafe.com<mailto:profoxt...@leafe.com>
Subject: RE: Need Help - Foxpro & Chilkat & Rest API

Generally speaking, the token is the key that unlocks access to the APIs you 
want to call. So you need to persist that in your business object, and pass it 
to any API calls you make. Depending on the API you're hitting, the token value 
could be in the request header or it could be a key:value pair in the payload.

--

rk

From: ProfoxTech 
<profoxtech-boun...@leafe.com<mailto:profoxtech-boun...@leafe.com>> On Behalf 
Of Paul H. Tarver
Sent: Tuesday, July 12, 2022 9:38 AM
To: profoxt...@leafe.com<mailto:profoxt...@leafe.com>
Subject: RE: Need Help - Foxpro & Chilkat & Rest API

Definitely!

I did have a small breakthrough yesterday as I was able to get an OAuth2 Token 
returned from within VFP. Woohoo!

Now if I can just figure out what to do with it. :)

Paul H. Tarver
Tarver Program Consultants, Inc.

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Ed Leafe
Sent: Monday, July 11, 2022 4:54 PM
To: 
profoxt...@leafe.com<mailto:profoxt...@leafe.com<mailto:profoxt...@leafe.com%3cmailto:profoxt...@leafe.com>>
Subject: Re: Need Help - Foxpro & Chilkat & Rest API

On Jul 11, 2022, at 16:51, Paul H. Tarver 
<p...@tpcqpc.com<mailto:p...@tpcqpc.com<mailto:p...@tpcqpc.com%3cmailto:p...@tpcqpc.com>>>
 wrote:
>
> I'll keep looking for your project and when you release it, I'll 
> definite consider upgrading to your tool as soon as I can.

Sounds like a potential beta tester! ;-)

-- Ed Leafe







[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives This message: 
https://leafe.com/archives/byMID/06a601d89623$628f2640$27ad72c0$@tpcqpc.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/lo0p123mb498887fef342697100362f008f...@lo0p123mb4988.gbrp123.prod.outlook.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to