API call works locally but fails on PROD

Any reason why this behaviour happens ?
4 Replies
Walshy
Walshy7mo ago
We'd need to know how/why it fails to be able to know
Ibby | Fk Israel
Ibby | Fk IsraelOP7mo ago
I making an Authenticated API call (hardcoded bearer token) , it works locally but on workers I get a response from external API saying credentials is invalid which indicates there is something wrong with the token @Walshy | DevPlat EE does cloudflare mess up headers ?
const headers = new Headers({
"Content-Type": "application/json",
Authorization:
"Bearer TEST_API_KEY:238c74459e0b1fe7cf630c2041719dc5:e7b6e47947b7ab314cb2c89d8552c43a",
});
const headers = new Headers({
"Content-Type": "application/json",
Authorization:
"Bearer TEST_API_KEY:238c74459e0b1fe7cf630c2041719dc5:e7b6e47947b7ab314cb2c89d8552c43a",
});
Walshy
Walshy7mo ago
I'd suggest checking your secret, it is very likely incorrect no lots of customers using bearer auth
Ibby | Fk Israel
Ibby | Fk IsraelOP7mo ago
I hardcoded my token and I'm still blocked

Did you find this page helpful?