REST url question

I have created a BAQ to return some data related to Jobs
I can call the query using REST https://myserver/myappserver/api/v1/baqsvc/myquery?myjobnum=12345
and it returns the data AFTER requesting Epicor credentials.

My question can the Epicor credentials be sent as part of the URL. This is to be used internally by a specific piece of equipment that will be making the request.

I have searched the forum for a couple hours but could not find any examples

You can pass them in the Request Header, which you set up differently depending on how you’re making the call. Something along the lines of

.setRequestHeader "Authorization", "Basic " & EncodeBase64("user:pass")

(This is VBA code)

Depending on what language you’re using, the syntax to set up the request header will be different. You’ll also have to encode your username/password in b64.

2 Likes

Or use an OAuth 2.0 token…like Azure AD.