Dropbox API v2 get_current_user - dropbox

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

Related

New at Twitter API V2

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.

How to use the authorization code from auth0 with my API after redirect

I'm building a SaaS project that requires authentication (duh!) and for that I am using Auth0.
I've managed to the steps detailed here successfully.
Code from above link:
https://YOUR_DOMAIN/authorize?
response_type=code&
client_id=YOUR_CLIENT_ID&
redirect_uri=https://YOUR_APP/callback&
scope=SCOPE&
audience=API_AUDIENCE&
state=STATE
But I'm not sure what to do when I redirect to the redirect_url (here my dashboard url, e.g: dashboard.example.com). I mean I don't know how to use this code.
I get the code appended to url after redirect, so I think everything's working, but am not sure how to use it further to populate the dashboard with user details and retrieve content.
Do I use my API endpoint here instead of the dashboard url?
Hope my question is clear.
Any help would be wonderful!
Thanks in advance!
Edit:
I am using Universal Login, not using any SDK as of now.
After you receive the code you will exchange it for tokens via the POST /oauth/token endpoint.
Here is an example code exchange request from the Authentication API docs
POST https://YOUR_DOMAIN/oauth/token
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&
client_id=YOUR_CLIENT_ID&
code_verifier=CODE_VERIFIER&
code=AUTHORIZATION_CODE&
redirect_uri=https://YOUR_APP/callback
Then, you can use the ID token to populate your user's info, and the access token to retrieve other data from your backend API.

API call Trustpilot

I'm trying to send invitation link through our own system and use the API call to get invitation link.
I have received the TOKEN but now have problems when I try with API call to get invitation link.
Get the error "403"
Have you tried passing the API key as well as the token?
Add this header to the request:
apikey: [YOUR_API_KEY]
For context, here is the documentation.
https://developers.trustpilot.com/invitation-api#generate-service-review-invitation-link

eBay API request error: 'Invalid access token. Check the value of the Authorization HTTP request header.'

I've registered as a developer with eBay and created an app.
I generated an Oauth (not Auth'n'Auth)
Using Postman to generate a simple request (image) and recieving an error for token invalidity
Error: Invalid access token. Check the value of the Authorization HTTP request header.
What am I doing wrong here?
If your token is for "sandbox" environment, make sure you use sandbox API endpoints for your requests as well.
Instead of https://api.ebay.com/buy/browse/v1/...,
try https://api.sandbox.ebay.com/buy/browse/v1/....
One of the issues which might have happened is:
The access token might have expired
Use the refresh token to refresh the access token when it expires — you know when to do this when your call to the API returns a status code of 401 and the above body you saw in Postman.

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