Skip to content
Playground(another site)

bynk.actor.foreign_missing_secret

Error A Foreign actor does not name the secret its calls are signed with.

A Foreign actor is a caller that is not Bynk. Its calls are signed, and the context checks each one against a secret, so the actor must name the environment variable that holds it. The string is the variable's name, never the key, and bynk deploy mints the key and sets it. With no name the context has nothing to check a call against. A secret that is not a string is bynk.actor.foreign_secret_not_string.

Example

actor Legacy { auth = Foreign } // ✗ no secret named
actor Legacy { auth = Foreign(secret = "LEGACY_CALL_KEY") } // ✓ the env var that holds the key

In the Book

See also

  • Every code in its category, Actors, on the diagnostic index.
  • bynk explain bynk.actor.foreign_missing_secret shows the same from the installed toolchain, without a network.