Forbidden (403) CSRF verification failed. Request aborted Ionic API V1

Hi all,
Well it seems that IONIC added some (JWT) Json Web Token Auth to their API with the release of version 2 beta,
and for the applications that was made with version 1.x the api is no Longer Useable without upgrading the whole application to IONIC 2, which is still in beta,
upgrading a full app to IONIC 2 is also troublesome as it’s using angular 2 as major change along with other big changes as well as such will require a lot of code re-write and frustration,
I’m using The api to Identify users, register for push notifications and send push notifications to users,
for now I can’t identify users anymore, as I’m getting https://apps.ionic.io/api/v1/app/96fa3c4c/users/identify
Forbidden (403)
CSRF verification failed. Request aborted.
and If you open the link it will say {“error”: “Alpha Services support has ended.”}
so, what’s up here? what is the best the you think I can do?
does anyone else have the same issue?

Did you read this?

http://blog.ionic.io/final-notice-sunsetting-ionic-platform-alpha/

Yes ofcurse I did, and I tried to start the proccess with
ionic add ionic-platform-web-client
but what I got was:

This command has been deprecate. All resources are currently available in NPM and we recommend that you use NPM to manage these.
More information is available here: Create new page · ionic-team/ionic-cli Wiki · GitHub

Bower error, check that “undefined” exists,
or try running “undefined” for more info. (CLI v2.0.0-beta.32)

Your system information:

Cordova CLI: You have been opted out of telemetry. To change this, run: cordova telemetry on.
6.2.0

Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 1.1.0
Ionic CLI Version: 2.0.0-beta.32
Ionic App Lib Version: 2.0.0-beta.18
ios-deploy version: 1.7.0
ios-sim version: 5.0.1
OS: Mac OS X El Capitan
Node Version: v4.1.1
Xcode version: Xcode 7.3.1 Build version 7D1014

Any Clue?

use bower install ionic-platform-web-client --save and reference the file in your index.html

Thanks, that solved a part of the problem,
and now I see after reading the docs that a lot have changed,
I mean there was that $ionicUser in ionic core, which seems to be no longer useable, and that I need to write my own services to use the API,
as far as I could understand

I had the same problem. Did u find a solution?

And for me the ionic-platform-web-client only made the ionicAppProvider become an unknown provider =(

I’m not really sure what you broke right there when trying to update,
I hope you have a backup of your project in case something’s gone wrong,
I didn’t really find a simple solution, the point is as far as I could understand, that the functions of user identify etc…
are harcoded into the core with v1 API which is no longer usable, which means, you won’t be able to use those functions anymore, instead there’s API v2, which has certain endpoints and such, that you can see in the Docs, which you will be using to create your own functions.
I’m not sure if there’s something else to it

1 Like

I am facing the same issue. Please see the description below:

My IOS mobile app for iPad has stopped working. It was working fine
before but since when the IOS certificates(for push notifications)
expired, it stopped working. Though, I renewed IOS certificates and
apple stated that now everything should be working fine. The app is
using ionic push notifications. Please let me know how you could help me
in this.

I noticed that there are some changes in the ionic api and version 2 has been released. Please see the link: https://apps.ionic.io/api/v1/app/5b6e463d/users/identify1
Please guide me know how to fix it.

Thank you,
Stuart Croft

Hi,
it’s a frustrating problem but I couldn’t solve that simply,
did you check the docs?
The API now has certain end points, to identify , register, login Send push and so on,
I guess you are using something like .identify({}) and RegisterPush etc…
You’ve got to re-write that part so it plays well with the new API , at least that’s what I have done

Those docs give me a 404. Got another link?!

please see this migration guide

Please let us know if find any solution with this.