Updated FDK to nodejs14 , apikey not works

Hello ,

I just updated my FDK as well as nodejs 14.

When I run my program and run requests, it gives me 401 errors.

I checked on postman my request, using my api key in base64, my request works.

I am not modifying any source of my program. I just updated the FDK and nodejs v14

“platform-version”: “2.2”,
“engines”: {

"node": "14.19.1",

"fdk": "8.1.1"

}

my request :
image

Thanks for your help

Hey @aliweb88

Good Day!

Let me check this and update you at the earliest.

1 Like

@aliweb88
Good Day!
can you please ensure the following things

  1. the URL is whitelisted
  2. passing the correct API key (to verify try without template literal)

if the above pieces of information are correct, can you please clarify that it did not work after updating the FDK version?

Thanks

1 Like

@Santhosh
1/ yes my url is in the whitelist in the manifest.json file

2/ After checking, all my requests have the same problem (since you need an API key)

I tried several manipulations:

  • I tried to put the api key in raw (Authorization: mykey)
  • I tried to encrypt my key in base64 (mykey:X => base64 , and Authorization: mykeyencrypted)
  • I tried to indicate the options directly in the request method, without going through a variable
  • I tried to change the name of my variable in ipparams ( apiKey => api_key)
  • I deleted the app/script folder to generate it again
  • I deleted the content of .fdk to generate again

I have the impression that all requests that need headers are blocked

yes I confirm that my project no longer works since the update of the fdk and node to the latest version announced

Thanks for your help

1 Like

@aliweb88
Good Day!
Apologies for the delay in response.

We are not able to reproduce the issue from our end and everything works fine when we tried making the request in the equivalent way you tried. If the issue still remains unresolved, please attach the app code for debugging purposes.

Also, attaching a similar thread that might help you.

1 Like

Hello ,

Thanks for your help.

I have already consulted a lot of topics on the forum that deal with the api key. I have already tried the 3 methods that exist. none correspond to my concerns.

The problem is that if I downgrade version of node.js and FDK it works

This is starting to get really urgent for me. because the FDK will not be used soon …

I managed to find a temporary fix but which in the long term sucks…

I don’t understand why I have to use such manipulation following your update!

BEFORE Header Params :
image

AFTER Header Params :

image

BEFORE Requester :
image

AFTER Requester :
image

Can you give me an explanation of such a change?

How about trying with the following sample? Maybe as you compare you can find where the bug is.

I tried it in following

  "engines": {
    "node": "14.19.3",
    "fdk": "8.3.1"
  }
1 Like

Hello @aliweb88
It looks like we have not managed to reproduce this error so far based on the information available to us. I would like to believe that the problem is not as simple as any request carrying headers being blocked because then most apps would be broken on the new NodeJS version.

To help us get to the bottom of this, can you please share some logs for us? Please do remove any credentials or secrets that may have shown up in the logs before sharing.

See how fdk.log helps in troubleshooting

Copy specific section of logs using Debug Mode

Share browser logs if you think those can help.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.