"No route found" error with Asana Connect - asana-connect

As per this, I'm trying to use the code received from the authorization endpoint to exchange for a token, using the Authorization Code Grant flow. I first issue this call:
https://app.asana.com/-/oauth_authorize?response_type=code&client_id=123468022031234&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&state=foo
(I admit I don't know how the 'state' param should be used - the documentation doesn't clarify this, and it's required; also, my app is not web-based so the value for the redirect URL is auto-generated on the Developer App Management page for my app)
That gives me this code (slightly obfuscated): 0/12341234fd6ccf6d168420f7f8600c93
Which I then use for this call:
https://app.asana.com/-/oauth_token?grant_type=authorization_code&client_id=123468022031234&client_secret=1234123442d5048f64ac39ca857ec57a&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&code=0%2F12341234fd6ccf6d168420f7f8600c93
Which unfortunately returns "No route found" instead of the token I need. What am I doing wrong?

It has to be a POST. I was using a GET call.

Related

"The provided value for the input parameter 'redirect_uri' is not valid" Using firebase

Firebase tells me to do this:
So I did
But I'm still getting this error "The provided value for the input parameter 'redirect_uri' is not valid"
I feel like I've followed instructions exactly but it's still not working. I have no idea how to debug this further. Any suggestions?
Here is my frontend code where I call signIn
let provider = new firebase.auth.OAuthProvider("microsoft.com");
provider.addScope("Calendars.Read");
firebase.auth().signInWithPopup(provider).then(handleResponse);
Edit
I changed the url to my custom domain and it seemed to be working but now I'm getting Error getting verification code from microsoft.com response: proof key for code exchange is required for cross-origin
For some reason Firebase decided to change the url where it handled auth. Instead of using the .firebaseapp.com/__/auth/handler url, it is using my actual custom domain. Though I don't really understand why this would happen...?
The Error getting verification code from microsoft.com response: proof key for code exchange is required for cross-origin was happening because I had configured an SPA on Azure instead of a Web platform.

LinkedIn Access Token Being Used

I've successfully secured my access token for the LinkedIn API. However, when I try to use it to gather user information (currently just my own so I know that the profile has all public settings) using this code:
requestURL = 'https://api.linkedin.com/v2/people/(id:{my_linkedin_id})'
headers = {'Authorization': 'Bearer' + ' ' + access_token}
a = requests.get(requestURL,headers=headers)
could someone elaborate on any steps I might be messing?
When I run this code I keep getting a
<Response [404]>
You have 404 as response and in LinkedIn documentation you can see that:
404 Resource Not Found
This error occurs when your application tries to call an API or fetch
an entity that does not exist. For example, the API to get a friend’s
profile is /v2/people/id={personId}, not /v2/person/id={personId}. In
some cases (Ads, for example), a 404 error is returned when attempting
to access a restricted API. See 403 Access Denied and contact your
partner technical support channel if you continue to see the error.
I think you need too check if your link to resource is good.

Gmail search with API and access token

I am trying to fetch Gmail search results from Gmail API using an access token.
The following code works and returns an array of my email IDs:
fetch(`https://www.googleapis.com/gmail/v1/users/${userId}/messages?access_token=${accessToken}`)
I then try to append a search query following the Gmail API documentation guidelines
fetch(`https://www.googleapis.com/gmail/v1/users/${userId}/messages?access_token=${accessToken}?q=${text}`)
and it brings this error code: 401, message: 'Invalid Credentials'
Authentication scope is set to https://mail.google.com/ which assumes full control of the email. I tried swapping access_token and q parameters, as well as removing the access_token parameter but still no success. What am I doing wrong?
`https://www.googleapis.com/gmail/v1/users/${userId}/messages?access_token=${accessToken}?q=${text}
you are preforming a HTTP GET in this call. Additional parameters are tacked on using a & only the first one starts with a ?
try this:
`https://www.googleapis.com/gmail/v1/users/${userId}/messages?access_token=${accessToken}&q=${text}

Got These credentials do not authorize access from nokia here api getlinkinfo

I'm performing the following call:
http://route.st.nlp.nokia.com/routing/7.2/getlinkinfo.json?app_id=APP_ID&waypoint=LATITUDE%2CLONGITUDE&app_code=APP_CODE
it always worked until yesterday, when I started getting http 403 error with the following json error message:
{
"response":{
"_type":"ns2:RoutingServiceErrorType",
"type":"SystemError",
"subtype":"SystemError",
"details":"These credentials do not authorize access. Please contact your customer representative or submit a request here https://developer.here.com/contact-us to upgrade your account. You can also get valid credentials by registering for a free trial license on https://developer.here.com.",
"metaInfo":{
"timestamp":"2017-11-08T10:48:02Z",
"mapVersion":"8.30.76.154",
"moduleVersion":"7.2.201744-2851",
"interfaceVersion":"2.6.34"
}
}
}
I checked my account but it's a Public Basic Plan one so there is no expiration or restriction on the api I'm calling.
Domains with nokia.com aren't supported anymore. You need to change the domain name to the actual one.
Try to use https://route.api.here.com/

I have registered app_id and app_key giving me this "error"Unauthorized","error_description":"Unauthorized. Th

for HERE REST api I have registered app_id and app_key and appended them in url but it is giving me this "error"Unauthorized","error_description":"Unauthorized. The request is not from an authorized source "
Also, the FAQs page mentions the following:
How do I generate an app_id and app_code for my application?
To generate an app_id and app_code for an application, you need to
sign in then go to https://developer.here.com/plans to select and
register for the appropriate plan.
At the final step in the registration process, an app_id and app_code
is automatically generated for your application.
Please note, it can take up to an hour for a new app_id to be whitelisted against all services.
So if you had just created your credentials when you got this error, you may want to try again.
Looking back at the error I received when I attempted to access the API, however, I got the following response:
{"details":"invalid credentials for I5zJljd5cZyOx5SyROKT","additionalData":[],"type":"PermissionError","subtype":"InvalidCredentials"}
So it may be that Jason's comment above is more appropriate but I'll leave this answer for other users who may come searching after creating new credentials.
A good way to check your credentials would be to make a valid URL call to any of the REST APIs - e.g. the Geocoder API: https://geocoder.cit.api.here.com/6.2/geocode.json?searchtext=London&app_id={YO‌​UR_APP_ID}&app_code={YOUR_APP_CODE} - it gives an error response for an invalid pair.
As mentioned in the answer : Need separate credentials for WSE API? - you may need to request additional access for the HERE Platform extensions
selfservesupport#here.com here is the support. Describe ur problem and attach an snapshot where you get error at what request. (URL)

Resources