# AJAX web to photon recent issue

**URL:** <https://community.particle.io/t/ajax-web-to-photon-recent-issue/52182>\
**Category:** Troubleshooting\
**Tags:** photon\
**Created:** [September 16, 2019, 2:15pm UTC](https://community.particle.io/t/ajax-web-to-photon-recent-issue/52182 "2019-09-16T14:15:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rocksetta](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rocksetta/32/5099_2.png) [@rocksetta](https://community.particle.io/u/rocksetta)\
**Post date:** [September 16, 2019, 2:15pm UTC](https://community.particle.io/t/ajax-web-to-photon-recent-issue/52182/1 "2019-09-16T14:15:58Z")

</div>

Has something happened with AJAX in a web browser or a recent Photon update that has broken AJAX XMLHttpRequest() commands. I have been using an .ino and .html pair for several years that has worked very consistently, and worked in April 2019, but presently does not seem to work.

I think it might be a CORS issue or a photon update but really not sure.

Github here:

> **[hpssjellis/particle.io-photon-high-school-robotics](https://github.com/hpssjellis/particle.io-photon-high-school-robotics/tree/master/a06-web-app)**
>
> Most of the important files from my High School Robotics course using the particle.io photon a wifi out of the box arduino. - hpssjellis/particle.io-photon-high-school-robotics

I will try to post a simple version of my issue. The problem seems to be when sending the form parameters. Curl commands work, sending curl commands in a node program works, just from the website seems to be an issue.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [September 16, 2019, 2:26pm UTC](https://community.particle.io/t/ajax-web-to-photon-recent-issue/52182/2 "2019-09-16T14:26:18Z")

</div>

I guess this might be the reason

> [@End of life for api.spark.io](https://community.particle.io/t/end-of-life-for-api-spark-io/50942):
>
> As of today, the Particle API can only be accessed through the api.particle.io domain. Access through the legacy domain api.spark.io has been disabled. I notified Particle users with web applications that made requests to the api.spark.io domain of this planned end of life by email one month ago. If you have a web application that stopped working because of the domain change, you must update it to make Particle API requests to the api.particle.io domain. No other change should be necessary in …

---

<div class="post-metadata">

**Author:** ![rocksetta](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rocksetta/32/5099_2.png) [@rocksetta](https://community.particle.io/u/rocksetta)\
**Post date:** [September 16, 2019, 3:01pm UTC](https://community.particle.io/t/ajax-web-to-photon-recent-issue/52182/3 "2019-09-16T15:01:25Z")

</div>

> [@ScruffR](#):
>
> I guess this might be the reason
> 
> [End of life for api.spark.io](https://community.particle.io/t/end-of-life-for-api-spark-io/50942)

Yes I think that might be related 😂😂😂😂

---

<div class="post-metadata">

**Author:** ![rocksetta](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rocksetta/32/5099_2.png) [@rocksetta](https://community.particle.io/u/rocksetta)\
**Post date:** [September 16, 2019, 4:20pm UTC](https://community.particle.io/t/ajax-web-to-photon-recent-issue/52182/4 "2019-09-16T16:20:47Z")

</div>

Thanks @ScruffR as always I really appreciate your knowledge base about Particle and your speed at replying. Your link did the trick and saved me hours of time researching other tangents (CORS, chrome updates, photon version etc etc) .

Just needed to replace

`https://api.spark.io/v1/devices`

with

`https://api.particle.io/v1/devices`

My code must be really old!
