Basic authentication for vidaxl api

Topic Labels: API Scripting
1085 2
Showing results for 
Search instead for 
Did you mean: 
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello, anyone availeble to help with basic authentication for vidaxl api. I am trying to get products data but really struggling with the authentication


// define the request url

let authUser = "some_email";
let authPass = "some_pass";
let authKey = authUser + authPass

let options = {
"method": "GET",
"headers": {
"Content-Type" : "application/json",
"Authorization" : "Basic " + authKey

let items = await remoteFetchAsync(base_url, options)
// let { data } = await items.json()
2 Replies 2

Authentication issues are some of the hardest issues to troubleshoot. Each API provider can customize how it does authentication. Plus, the error messages tend to have very limited information since you are not able to authenticate as an approved user.

Your best bet is to look at the documentation for the API provider and/or contact their support.

On the other hand, if they indeed use basic authentication, you can try changing this line

let authKey = authUser + authPass

let authKey = authUser + ":" + authPass

When writing code, even small character differences can matter.

5 - Automation Enthusiast
5 - Automation Enthusiast

Thanks @kuovonne I figured it out. I had the username and password so I used postman to get the data and then I used the code generator feature postman to generate the script for the authentication. Now I have been able to used it to generate the data in airtable