Log inStart Free Trial
Meta Tech Provider

"This authorization code has expired" after Coexistence signup

When Meta's Embedded Signup finishes, it hands the launching platform a short-lived code that must be exchanged for an access token within 30 seconds. If the exchange happens later, or uses a code from an earlier attempt, Meta answers that the authorization code has expired. Running the flow again produces a fresh code.

30 seconds

The time-to-live Meta gives the exchangeable token code returned by Embedded Signup.

Server-side

Meta says the token exchange must be a server-to-server request, never a client-side one.

24 hours

Time a platform has after onboarding to synchronise a Coexistence number's history before the flow must be redone.

What code has expired?

When the business completes Embedded Signup, Meta returns the asset IDs and an exchangeable token code to the browser window that opened the popup. The platform then sends that code to its own server, which calls Meta's oauth access_token endpoint with its app ID and app secret to exchange it for a business token.

Meta's implementation guide is explicit about timing: the exchangeable token code has a time-to-live of 30 seconds, so the platform must be able to exchange it before it expires. An exchange attempted after that point is refused, and "This authorization code has expired" is how that refusal reads. The business did nothing wrong by finishing the popup slowly; the clock starts when the code is returned.

Why does it happen after the popup finishes late or twice?

Several situations can delay the exchange past that limit.

The browser tab was left in the background or the laptop slept as the flow finished, so the code reached the platform's server well after it was issued. The platform's server queued the exchange behind other work instead of doing it straight away. Or the person opened the flow twice, finished both, and the platform exchanged the code from the first window after the second one completed.

In testing there is a fourth: copying the code out of the browser console and exchanging it by hand with cURL or Postman. Meta's guide warns about exactly this and says to have the exchange request ready before starting.

How do you complete the connection?

Run the flow again from the start in a single window, and let it finish with the platform's page in the foreground. Each completion returns a new code, and a prompt exchange of that code is all the platform needs.

For a Coexistence number, do it promptly. Meta converts the WhatsApp Business account when the business completes the flow, and once the platform onboards the customer it has 24 hours to synchronise messaging history; after that, the business must be offboarded and complete the flow again.

On the platform side, the durable fix is to exchange the code on the server the moment it arrives, before any other onboarding step.

Common mistakes

  • Retrying the token exchange with the same code. It expired after 30 seconds and will not come back.
  • Running the signup in two windows at once. Only the code from the attempt being exchanged counts.
  • Exchanging the code from the browser. Meta requires the exchange as a server-to-server request with the app secret.
Doing this with EasyCoexistence

EasyCoexistence exchanges the code on its server as soon as Embedded Signup returns it, and records each attempt on the connection timeline, so a lost code shows as a dated event rather than a vague failure.

Frequently asked questions

Did the business connect the number or not?

The business completed Meta's flow, but the platform could not turn the code into a working token, so it cannot act on the number yet. Running the flow again gives it a fresh code.

Can the code be made to last longer?

No. Meta sets the 30 second time-to-live, and no platform can extend it.

Is the WhatsApp Business app affected?

No. The app keeps working on the phone while this is resolved.

Is this the same as an expired access token?

No. This is the short-lived signup code. An expired access token on a working connection returns error 190.

Keep reading

Ready to get started?

Set up WhatsApp Coexistence in minutes, not months. The app keeps working on the phone.

Start Free Trial

Verified on

Coexistence Error: Authorization Code Expired