New at Twitter API V2 - api

I wanted to start learning about Twitter API V2 so, I created a developer account and created my first app. I saved the api key, api key secret and my Bearer token.
But when I tried the example in the documentation in my terminal it didn't work.
what I am doing wrong ?
error I got

Remove the < and > characters from the bearer token string value. They are there to denote that the whole value should be replaced with your bearer token.

Related

Authentication of the request failed. GoogleAdsapis POSTMAN call

I am using google ads api, I have generated Access Token, Refresh Token, I have CustomerId of my Ads Manager account, my developer token still getting this error. **My ultimate goal is to generate Keyword ideas using google ads api **
You have to put your generated token inside your request-header. With that token inside the header, every request to your API is authorized.
You can see that you have an "Authorization"-Token with the empty value "Bearer". There you have to put in your token, that your API can check the token and validate it. Same thing with the developer-token. Your requests sends empty header values.

How to get LinkedIn API OAuth token

Using the set up above in the images, I am trying to make a rest call to LinkedIn to recieve my Oauth token following this guide: https://medium.com/#ellesmuse/how-to-get-a-linkedin-access-token-a53f9b62f0ce
However I am getting the error:
The redirect_uri does not match the registered value
Any ideas?
I had to set up the localhost url for my callback instead of using the random google link

Unable to generate refresh token for IBM Visual Recognition API

I am trying to work with IAM token based authentication. I am able to generate 'access token' and could do operations using the 'access token'. Now I am having issue while generating 'refresh token'. I am following this link https://cloud.ibm.com/docs/services/watson?topic=watson-iam.
I am using below command to generate refresh token. Here Authorization header value obtained using username as 'apikey' and value as my key. {refreh-token} value I am using which I received while generating 'access token'.
curl -k -X POST --header "Authorization: Basic Yng6Yng=" --data-urlencode "grant_type=refresh_token" \ --data-urlencode "refresh_token={refresh-token}" "https://iam.bluemix.net/identity/token"
I expect to get refresh token but get error {"context":"requestId":"021c3482...""},"errorCode":"BXNIM0507E","errorMessage":"For OpenID Connect related APIs, you need to send your client credentials as basic authorization header"}
Can some one help me in understanding what is going wrong
The description in https://cloud.ibm.com/docs/services/watson?topic=watson-iam is incorrectly describing the refresh case. I will follow-up with the docs team to update that section.
This is the generic description how to get tokens for API keys:
https://cloud.ibm.com/docs/iam?topic=iam-iamtoken_from_apikey
For API usage, IBM Cloud allows you to generate access token's without providing a client id / secret. In this case, a default client id is assumed which is only allowed to create tokens for API keys, but not authorized to use any other grant type - including the grant_type refresh_token. Therefore, simply dismiss the refresh token from the response of the API key grant in the first call - you won't be able to use it.
In the API key use case, there is no benefit of using the grant_type refresh_token over getting a new access token with the API key grant type anyway - all validation steps that are done internally (does the user stil exist / is the user still in the account / ...) are identical. But the refresh token eventually will expire - the API key not.

Bad authentication data when making Twitter GET request on Postman

So I generated access token and access token secret on Twitter
However's every time I make a GET request on Postman I get bad authentication data:
I copy & paste the access token after "Basic" in the Value so I don't know why it's not working?? I would be so grateful if anyone helped!!!
PS I didn't put anything in the authorization tab on Postman. Not sure if that's relevant:
You should be getting GET not POST for statuses/user_timeline as per Twitter API User Timeline
GET statuses/user_timeline

Dropbox API v2 get_current_user

I am migrating from API v1 to API v2 and have this problem here.
First i receive the token with this request:
https://api.dropbox.com/oauth2/token
Then i call
https://api.dropboxapi.com/2/users/get_current_account
adding "Authorization: Bearer xxxxxxx" header to get user's display name, but it fails every time with this message:
{protocol=http/1.1, code=400, message=Bad Request, url=https://api.dropboxapi.com/2/users/get_current_account}
The same code with API v1 calls worked just fine. Is there anything i missed? Thanks
Why don't you use a SDK like CloudRail? Then it would be just a function call like documented here