Where is your logic block located? I suspect that you probably need to create a logic block that interacts with a product either within the product, or within the organization.
If you create a logic block at the top level of your sandbox, it won't have any API user assigned, because API users are scoped to product or organization only, not sandbox.
@rickkas7 I am creating a logic block within a product and passing its product ID to the listDevices function.
I have tried this again with a new function in another product to confirm and it is still failing