Can't access api.quickblox.com/session.xml - quickblox

When I try to access api.quickblox.com/session.xml to create a session, I get a 404 error.
I tried to access it in both browser and c#.
In the browser I get:
The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved.
In C# I get
System.WebException: (404) Not Found.

You have to use POST request (not GET) to access to this API
Please read here http://quickblox.com/developers/Authentication_and_Authorization#Requests_and_Responses

Related

Twinfield API: how to get accesstoken using postman?

I'm trying to connect to the Twinfield API. I have registered an app in the developer portal, and created a callback URI. My call looks as follows:
https://login.twinfield.com/auth/authentication/connect/authorize?redirect_uri=https://oauth.pstmn.io/v1/callback&response_type=id_token+token&client_id=###&client_secret=#####
Link to twinfield api documentation
However I get the error stating that the client application is not known or is not authorized.
Can someone help me with this problem?
Think you are missing the code, see below the response_type
&response_type=code&scope=openid+twf.user+twf.organisation+twf.organisationUser+offline_access&redirect_uri=https://oauth.pstmn.io/v1/callback&
Once you've run this, you get a code and together with basic64encoding of your client_id:client_secret would profide you an access code.
The whole request should look like:
https://login.twinfield.com/auth/authentication/connect/authorize?client_id={xxxx}&response_type=code&scope=openid+twf.user+twf.organisation+twf.organisationUser+offline_access&redirect_uri=https://oauth.pstmn.io/v1/callback&state=SOME_RANDOM_STATE&nonce=SOME_RANDOM_NONCE
for me to get this working in postman I need to copy the whole link into the browser, login there and then get from the return link the code when you see the page "Your call is authenticated"

users api of geoserver

I was using geoserver api to create a new user for my application, after I upgraded my geoserver to 2.18.2 the same code doesn't work any more.
until now I used this route which was working absolutely fine:
http://geoserver:8080/geoserver/geofence/rest/usergroup/service/jdbc_userservice/users
If i still use this route, I get this error:
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Therefore I tried this route which I found in their api docs:
localhost:8080/geoserver/rest/security/usergroup/users
but I get this error:
Type Status Report
Message Forbidden
Description The server understood the request but refuses to authorize it.
any hint or docs about this issue will be appreciated.

TopDesk: Unable to get authorization token using Login API

Referring to TopDesk's Login API,
I'm using PostMan to be authorized.
GET http://www.topdesk.com/api/login/person
Authorization: Basic <base64 encoded password removed>
However, I get 404 Not Found Error and Content-Type is html.
I was expecting it to be either:
200 - OK
401 - Unauthorized
500-Internal-Server-Error
in JSON format.
Any ideas?
Looking at the docs I don't think http://www.topdesk.com/ is the base URL for the API. I don't know what your specific API URL is.
Do you have a set up like the screen shots in this example, if so then the url will be available in that
A 404 code suggests the URL is wrong - http://topdesk-url/tas/api/login/person is the one in the API docs which is slightly different than the one you provided in the question.
The base path that you’re using and the /tas/ (this might be a username or account name etc) section is missing from your example request.
http://www.topdesk.com is not a real TOPdesk instance, it's just a website. A real TOPdesk instance's address looks like one of these:
mycompany.topdesk.net (if it is hosted in the cloud)
topdesk.mycompany.com (if it is hosted locally)
The reason why you got a 404 is because that url simply doesn't exist.

How to return 400 http error code instead of 401 without any scripts?

I need to return error code 400, when user enter bad credintials for suppress browser's basic auth dialog
But i cannot change response code on server side.
I guess it is possible with some .htaccess rules, but google don't have a answer to my question, i just found solutions for 403 -> 404, but it don't work for me.
How can i do that?
You can send custom error responses but you cannot change the actual error code returned. That would be a very practice.
See https://httpd.apache.org/docs/2.4/custom-error.html
Btw, if you enter bad credentials, you will be taken to the 401 page. You'll only get the auth dialog again if you try to reload the page (or, try to load protected items from the 401 page itself, which of course creates an infinite loop and never allows you to escape the auth dialog).

"Sorry, an error occurred while processing this request" instagram api python-instagram

I'm using python-instagram library to get access to instagram api. But when I run my app (flask rest api application), my auth method which use InstagramAPI and get_authorize_login_url method raise 500 error:
raise OAuth2AuthExchangeError("The server returned a non-200 response for URL %s %s %s" % (url, response['status'], content))
OAuth2AuthExchangeError: The server returned a non-200 response for URL https://api.instagram.com/oauth/authorize?scope=basic&redirect_uri=http%3A%2F%2Fsocialservice.test.5-soft.com%3A8515%2Finstagram%2Fauth&response_type=code&client_id=c5095d88cee14bac91a9341e6e82ff8f 500 Sorry, an error occurred while processing this request.
In my local machine it works without any problems but in the production server with different IP I've got this problem.
I would be very appreciative if someone can help to solve me this problem
Thanks in advance,
Ron
Please clarify:
In my local machine it works without any problems but in the production server with different IP I've got this problem.
How can you be performing authorization on your local machine? Instagram's API requires a public url for redirect_uri.
Next, I haven't found any evidence to verify this, but I don't believe you can specify a custom port in your callback url (you've provided http://socialservice.test.5-soft.com:8515/instagram/auth).
Last, assuming it's your callback server that is the problem, that error usually occurs when you aren't returning the correct response back to Instagram. The server needs to echo out only the value of the GET parameter code as plaintext.
If I browse to here: http://socialservice.test.5-soft.com:8515/instagram/auth?code=test I get no response, which is likely the cause of your error.