bearer token (1 Viewer)

irade92

Registered User.
Local time
Today, 05:10
Joined
Dec 26, 2010
Messages
229
Hi

How do I send a POST Request with Bearer Token Authorization Header? .​

 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:10
Joined
Oct 29, 2018
Messages
21,471
Have you checked the documentation from the provider, if they have any?
 

irade92

Registered User.
Local time
Today, 05:10
Joined
Dec 26, 2010
Messages
229
Hi

How do I send a POST Request with Bearer Token Authorization Header? .​

I am retrieving a Json token with API method and then as a header I put it as a bearer token using POST to get some XML file
for example...
mToken= "ksgfkasgklgkglfpjgRPOAGIOopeijiofjagfm"

req.Open "POST", "https://grmmapi.st/api/Prescription/AllPrescriptions?insuredPersonId=" & Me.mEZBO_ERECEPT, False
req.getResponseHeader "Authorization", "Bearer " & mToken
req.send


is this formulation ok?
 

conception_native_0123

Well-known member
Local time
Yesterday, 22:10
Joined
Mar 13, 2021
Messages
1,834
it seems to be, based on others that were doing the same thing but with a different method:



I've never seen people do this with POST before, but the difference between POST and GET methods is intake length only, if I remember right. still not understanding what your question is about though, sorry. =(
 

ByteMyzer

AWF VIP
Local time
Yesterday, 20:10
Joined
May 3, 2004
Messages
1,409
I am retrieving a Json token with API method and then as a header I put it as a bearer token using POST to get some XML file
for example...
mToken= "ksgfkasgklgkglfpjgRPOAGIOopeijiofjagfm"

req.Open "POST", "https://grmmapi.st/api/Prescription/AllPrescriptions?insuredPersonId=" & Me.mEZBO_ERECEPT, False
req.getResponseHeader "Authorization", "Bearer " & mToken
req.send


is this formulation ok?
You will need to change:
Code:
req.getResponseHeader "Authorization", "Bearer " & mToken
...to:
Code:
req.SetRequestHeader "Authorization", "Bearer " & mToken
 

irade92

Registered User.
Local time
Today, 05:10
Joined
Dec 26, 2010
Messages
229
You will need to change:
Code:
req.getResponseHeader "Authorization", "Bearer " & mToken
...to:
Code:
req.SetRequestHeader "Authorization", "Bearer " & mToken
thanks a lot
 

Users who are viewing this thread

Top Bottom