Has anyone been able to use Twitter’s “Application-only” API to run a search of tweets from Bubble? The benefit of this API from Twitter is that is doesn’t require being logged into Twitter to call the Twitter API. See OAuth 2.0 App-Only (Bearer Token) | Docs | Twitter Developer Platform
It seems quite complicated. For starters, what type of authentication of the types available in Bubble should be used? Presumably one of the OAuth2’s?
No, none or self handled. It is an encoded Bearer token.
The in header you will put Authorization and Bearer : whateverererererere
The “whateverererererere” bit are the consumer key and secret messed about with …
URL encode the consumer key and consumer secret according to RFC 1738. Note that at the time of writing, this will not actually change the consumer key and secret, but this step should still be performed in case the format of those values changes in the future.
Concatenate the encoded consumer key, a colon character “:”, and the encoded consumer secret into a single string.
Thank you so much for taking the time write this. It has been very helpful!
It seems that there is an additional step. Here is my understanding:
First, a user must encode the consumer key and secret to obtain Bearer Token credentials. This requires a Key Value of Authorization and Basic in the header.
Second, use the encoded/Bearer Token credentials to obtain the actual Bearer Token. This requires a Key Value of Authorization and Bearer in the header.
My understanding is based on the following Twitter docs:
Based on the above, I’m unsuccessfully trying to use Bubble to send a Post API call to obtain my Bearer token based on my Bearer Token credentials, as shown in the following image:
It is not working. I am getting the following error when I try to Initialize call in Bubble: “undefined error: this header name is not correct undefined”
Any additional assistance would be greatly appreciated!
Hello @hshadab. First of all, thanks a lot for your replying.
The thing is that I achieved to get to that screen you post but I cannot obtain just the hidden code that you draw in red colour. I made it for Airtable, but I cannot obtain for Twitter in this website: