C Calvin Yee Member Licensed User Jan 8, 2019 #1 I have an HttpJob where I'm trying to set the header in the following way. While requesting any data from API, the request should include Authorization header with Bearer as its scheme then follow by authentication token. JobNDLogin.Initialize("JobNDLogin", Me) JobNDLogin.Download2("https://test.b2b.com.my/api/cust/Login", Array As String("username", strLoginID, "password", strLoginPassword)) JobNDLogin.GetRequest.SetHeader("Authorization : Bearer " , access_token ) I obtain the following error. ResponseError. Reason: Unauthorized, Response: {"Msg:"Authorization has been denied for this request Any suggestion to fix this problem? Thanks a Lot to everyone. Best regards.
I have an HttpJob where I'm trying to set the header in the following way. While requesting any data from API, the request should include Authorization header with Bearer as its scheme then follow by authentication token. JobNDLogin.Initialize("JobNDLogin", Me) JobNDLogin.Download2("https://test.b2b.com.my/api/cust/Login", Array As String("username", strLoginID, "password", strLoginPassword)) JobNDLogin.GetRequest.SetHeader("Authorization : Bearer " , access_token ) I obtain the following error. ResponseError. Reason: Unauthorized, Response: {"Msg:"Authorization has been denied for this request Any suggestion to fix this problem? Thanks a Lot to everyone. Best regards.
aeric Expert Licensed User Longtime User Jan 8, 2019 #2 Have you tried: Code: Copy JobNDLogin.Username = strLoginID JobNDLogin.Password = strLoginPassword Upvote 0
DonManfred Expert Licensed User Longtime User Jan 8, 2019 #3 You Authorization Header is wrong: Try it this way Code: Copy JobNDLogin.GetRequest.SetHeader("Authorization","Bearer "&access_token ) Last edited: Jan 8, 2019 Upvote 0
You Authorization Header is wrong: Try it this way Code: Copy JobNDLogin.GetRequest.SetHeader("Authorization","Bearer "&access_token )