First PHP Plain with fidor API

Resolved
9 posts

Hello,

I am new to fidor API. For the first touch I tried to use PHP Plain project to get the access token. I ran the PHP server and went to browser with the localhost:8000/example.php link, afterwards I logged in with the credentials from API Sandbox page, I accepted the conditions, then I got the link like this:
http://aps.test.fidor.de/oauth/authorize?authenticity_token=a _long_token&client_id=my_id&commit=Allow+&offline_access=&redirect_uri=http://localhost:8000/example.php&response_type=&state=&utf8=checkicon

And it stopped there, there was no more action.

What should I do next to get the access_token from fidor API ?
Thanks in advance

Hi AnhDungLE,

we’ll take care of the issue and will inform you when the problem is solved – stay tuned.

Cheers
Igor

Hi,
I found the issue: the redirect_uri registered in the application web page doesn’t match with the redirect_uri in the php file. Simply fix the redirect_uri in the application page into localhost:8000/example.php from localhost:8080/example.php.
Don’t know if there should be a warning/error saying the redirect_uri is not correct/matched ?
Regards,

  • This reply was modified 2 years, 5 months ago by  AnhDungLE.

Hi Igor,

For the PHP sample application, I was able to create the access token. But for now, when the application goes to the link http://aps.test.fidor.de/login?redirect=/oauth/authorize?client_id=my_PHP_id&code=&redirect_uri=my_redirect_url
The webpage shows:

We’re sorry, but something went wrong.
If you are the application owner check the logs for more information.

It appears the same for the Node JS when I try to test.
I am not sure this is the internal problem from API for I have something configured in the wrong way ?

Thank you for your support,
Regards,
AD
—————————
Update 1: after deleting the old PHP Plain and create the new one, it seems to work again. The issues maybe about the cookies and/or the history of the previous access I suppose.
Regards,

  • This reply was modified 2 years, 5 months ago by  AnhDungLE.

Update 2: In fact the “We are sorry” issue is not really finished. When I was trying to get the URL, the php server points to the OLD client ID and client secret (maybe the cache of the file somewhere in the server), and when I fix the the client ID and secret with the new one, it still points to the “We are sorry” issue. I am looking to see your responses.
Regards,
AD

Hi AnhDungLE,
thanks for your feedback, which made us fix an issue in our sandbox.
I also updated the php example(in https://github.com/fidor/fidor_starter_kits ), which still had the wrong ip in the callback url.
Just tested the whole create&download process and it works for me.

Sorry for your struggles and again thanks for your posting, this is what keeps us moving!

george

Hi George,

It’s great, I am able to generate the token and contact to the fidor API again.
Thank you for your help. Keep doing good work!

Regards,
AD

It’s not working for me, too. With the php plain example out of the apm.fidor.de iam stuck on https://aps.fidor.de/oauth/authorize?client_id=35683189bcec7f16&redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Fexample.php

With a white screen.

I also can’t create a private user token in the interface.

@on4fox: that’s strange, maybe check your browser settings if it blocks some ports or incoming message, and make sure your php server is running properly.
Regards,

You must be logged in to reply in this thread.