Can't access Quay API - api

I am trying to retrieve information from Quay's API.
I have already generated "application token" in Quay by clicking on "Create Application Token".
Then I try to get information from any endpoint using the header Authorization: Bearer <TOKEN>, but I am always getting a 401 response.
Am I missing any step? Am I doing something wrong?

Related

Request for oauth_token for Twitter shows "Sorry this page doesn't exist" error

I am sending an API request to get my oauth_token through postman. This is my request:
https://api.twitter.com/oauth/request_token?oauth_callback=oob
where the header is Content-Type:application/json and I am providing API key and secret under the Authorization Tab with OAuth 1.0.
On sending this get request, the request returns the error "Sorry, this page doesn't exist".
Please check the image for reference
I used https://twitter.com/oauth/request_token?oauth_callback=oob and it resolved my issue. Twitter used to use "api.twitter.com" call to authorize API request but they changed back to "twitter.com" which worked for me.

Issue of invalid access token when trying to get households

I haven't had an issue getting access tokens, but when I try to test my access token by requesting households, I am getting 'Invalid Access Token' as a response. My refresh token appears to be working fine, but even refreshed access tokens are failing for this request.
I may be setting up my curl incorrectly for this request, can you please let me know exactly which tokens/keys/values are to be placed in these 2 headers, I don't find the documentation to be clear:
Authorization: ***** Hidden credentials *****
X-Sonos-Api-Key: 00000000-0000-0000-0000-000000000000
Thanks
In the sample getHouseholds request, you need to provide your access token as a header in the format:
Authorization: Bearer <Access-Token>
and then your API Key (generated when you created your integration) in a second header:
X-Sonos-Api-Key: <Api-Key>
Be sure to also include the content-type header:
Content-Type: application/json

Getting error while fetching uber authentication token

Getting auth token from uber is a two step process.
Please refer Uber Auth API
Ask the uber user to authorize : call GET https://login.uber.com/oauth/v2/authorize?response_type=code&client_id={client_id}&redirect_uri={redirect_uri}
Provide your client_id and redirect_uri specific to your website. If the authorization is successful, you will be redirected to your site with the code in the query parameter.
The the code you get in step 1 to retrieve auth token.
Send an HTTP POST request to https://login.uber.com/oauth/v2/token. Following should be the json you send to server:
{
"client_secret": "{client_secret}",
"client_id": "{client_id}",
"grant_type": "{authorization_code}",
"redirect_uri": "{redirect_uri}",
"code": "{insert authorization code obtained in previous step}"
}
In the step two I always get a error 400 with "invalid grant type" message. Please suggest where am I going wrong.
You need to send the parameter as form-data, not JSON. Take a look at the curl example in section 3 here: https://developer.uber.com/docs/authentication
The authorization and authentication documentation doesn't mention anything about JSON, therefore application/x-www-form-urlencoded media type is to be used to send the HTTP POST request to the /oauth/v2/token API endpoint

Invalid credentials error requesting oauth2 token from PayPal API

I am using the PayPal REST API for the first time and trying to get an authentication token but keep getting an "Invalid credentials error".
I am following Step 2 in the documentation found here:
https://developer.paypal.com/webapps/developer/docs/integration/direct/make-your-first-call/
I am using the Chrome extension "Advanced rest client"
Here are the values entered in the rest client:
Header:
content-type:application/x-www-form-urlencoded
Accept:application/json
Form data
grant_type:client_credentials
clientId:ASF6RRBP0uTq7FnC90tpFx7vfA-Pliw8uQDjv5RZ10Y_NVspuc88pUPLN6yM
secret: EAdx7BDKzWczDomYG2QDHu8jhaAXj4xDZLHadvL5aRfesjwo5c81zbSpRxuE
When I send the request I get the following error:
{
error: "invalid_client"
error_description: "Invalid client credentials"
}
Can anyone help me to figure what I am doing wrong here?
Form data should only contain
grant_type=client_credentials
and then add header
Authorization: Basic put base64of(clientid:secret)here
don't pass client id and secret in form data.

SurveyMonkey API - Console issue

im trying to test the Survey Monkey api via the online test console but keep getting the following error:
https://developer.surveymonkey.com/io-docs (link)
It's asking me to enter the Authorisation:
Content-Type:
Authorization: bearer %s <--- not sure where to get this from? (Access token)
api_key:
JSON:
and so im getting a "errmsg": "Invalid \"Authorization\" data in request header"
Is this generated elsewhere.. or am i missing something
You get the access token when you perform OAuth - select the app from your existing client credentials, hit Authorize, log into your SurveyMonkey account, and it should auto-populate the 'Access Token' field. Then copy this into the Authorization header in the form "bearer (access token)" (without the quotes or parentheses).
Cheers,
Miles
The authorization header works for me with bearer XXXYYYZZ. Doc here: https://developer.surveymonkey.com/mashery/requests_responses