I doubt you should be sending a token when you are trying to get a token
from the /token endpoint.



On Mon, Nov 17, 2025 at 9:25 AM Hiebert, Chris via RPG400-L <
rpg400-l@xxxxxxxxxxxxxxxxxx> wrote:

In Postman you are sending the header “Authorization: Bearer token” and
the api is working.

--header 'Authorization: Bearer eyJ0e... g' \

In HTTPAPI you are not sending a Bearer token and the api is failing.


--
Chris Hiebert
Lead Software Developer
Disclaimer: Any views or opinions presented are solely those of the author
and do not necessarily represent those of the company.

From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
(WalzCraft) Jerry Forss
Sent: Wednesday, October 15, 2025 7:24 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: External Re: Auth 2.0


From postman



curl --location '
https://login.microsoftonline.com/ca4f5969-c10f-40d4-8127-e74b691f95de/oauth2/v2.0/token
<
https://login.microsoftonline.com/ca4f5969-c10f-40d4-8127-e74b691f95de/oauth2/v2.0/token_>
' \

--header 'Content-Type: application/x-www-form-urlencoded' \

--header 'Authorization: Bearer eyJ0e... g' \

--header 'Cookie: fpc=Ajxh5I5InBtGiamgtxBp0gFoxTAqAgAAAAeSgeAOAAAA;
stsservicecookie=estsfd; x-ms-gateway-slice=estsfd' \

--data-urlencode 'client_id=Our Client ID' \

--data-urlencode 'client_secret=Our Secret' \

--data-urlencode 'scope=
https://tffproduction.onmicrosoft.com/code/.default ' \

--data-urlencode 'grant_type=client_credentials' \

--data-urlencode '='




--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.