codeigniter rest api not working on liver server - codeigniter

I have a url:-
http://brokers4homes.esoftech.in/
I have created a web service and created a customer
$route['api/v1_0/usersignup'] = "api/user_api/usersignup"
I am hitting url:-
http://brokers4homes.esoftech.in/index.php?api/v1_0/usersignup
but it does not give me any json result instead it redirects me to home mage:-
This is my form:-
http://brokers4homes.esoftech.in/index.php/rest_server

Related

Including image URL in Strapi v4 REST API response

First of all I've seen Accessing image url in Strapi and Strapi v4 REST API :GET image and Media field is not showing up in api response of strapi v4 which all tell to add ?populate=* to the request. I am already doing that.
I'm calling my API endpoint http://my-url/api/my-type?populate=* and everything is returned, including everything else but the image URL. I can also confirm that populate=* is working as if I remove it I also stop getting many fields too.
In content manager, I can see the file is uploaded, and is accesible through the obtained URL by tapping "copy link", so the file is there too.
How can I get the image URL in Strapi API request? I'm on Strapi v4.1.8.

Page not found error in Django and rest framework

Working on a payment gateway integration where I need to save some values like transaction details. I am getting problem with url.
The following url which I am using to save the and to redirect to success page :
urlpatterns = [
path('api/payment_details/<int:pk>/',payment_details,name="payment_details")
]
so the url I want is http://127.0.0.1:8000/basic/api/payment_details/id=6&response=success/
but I am getting http://127.0.0.1:8000/basic/api/payment_details/id%3D6&response%3Dsuccess/
response =success we get after transaction has done successfully

Login with Google in Laravel using Postman

I am new to laravel and making a login with the Google module in Laravel using Postman. I've successfully generated a Google access token. But how to make the whole module of login with Google in Postman? and Can we use that access token in other modules?
I think it is not possible with Postman.
there are two things will be possible
You can configure your app with Google and send information to server (Database) through API.
or you can create a webpage and there you have to create a setup to login with google and save information in database and send success or failure in form of response

Laravel 5.4 web session expired and api token mismatch error handle separately

I'm new to laravel. I'm developing a web application using laravel 5.4. this app has an API also to communicate with mobile apps (these routs are inside routs/api).
My question is how to track token mismatch error and return a 401 with json msg. Now what's happening is whenever a request comes to api with invalid or no token, it's route back to login page.
This happens as the web app is configured to do so when user try to access a page without logging in.
I tried the exception/handle/render function but both exception are same type so couldn't differentiate.
(Both api and web app is in one laravel application)

OAuth for Javascript Website (with Spring Server)

Im having a problem to understand the OAuth flow with Spring.
I have a server running, which got protected endpoints to deliver metric data about the users, revenue usw.
These are used inside an admin panel written in Angular2. Currently the access_token for these endpoints is received by sending the ClientId/Secret and username password to my server.
But obviously its bad to store the Clientsecret on a javascript site.
So I need a way to retreive an access_token from javascript without exposing the client_secret.
I tried to implement the Spring OAuth2 implicit flow which somehow works, but only when I type it inside a browser so the /login page from spring shows up.
My Admin panel has its own Login page so this doesnt work out.
Does anyone have suggestions?

Resources