Twitter APIで"Client Forbidden"エラー

Tweeter APIを使用したアプリを作成していて、以下のエラーではまった。

When authenticating requests to the Twitter API v2 endpoints, you must use keys and tokens from a Twitter developer App that is attached to a Project. You can create a project via the developer portal.

Twitter Developer Potalで表示されるBearer Tokenをつけたcurlコマンドを実行しているのだが、何故かエラーが出る。 Bearer Tokenは、Developer Potalで出力したものを設定しているのに。。。

curl "https://api.twitter.com/2/tweets?ids=1261326399320715264,1278347468690915330" -H "Authorization: Bearer $BearerToken"

あれこれ、ハマった結果、Developer Potalでアプリはあるけど、プロジェクトが紐付けられてなかった。 プロジェクトを作成したら、エラーにならなくなりました。。。

よくみたらエラーメッセージの中に書いてるやん。。。英語を鍛えないとなぁ。

you must use keys and tokens from a Twitter developer App that is attached to a Project. You can create a project via the developer portal.