Ajax connection problem

This is where you will find Espacenet relevant technical issues as well as the respective tips and workarounds
Post Reply

santi
Posts: 3
Joined: Fri Oct 27, 2017 10:43 pm

Ajax connection problem

Post by santi » Fri Oct 27, 2017 10:51 pm

Hello,

I've tried so many times sending post like you wrote in documentation but I think something is not explain correctly.
Please reply to my post how should I ask in ajax to get:
1) access token
2) get data by applicant of his all patent.

Here is my post ajax:
$.ajax({
method: "POST",
url:"https://ops.epo.org/3.1/auth/accesstoken",
headers:{
'Authorization':"Basic blo1ZlExb3lSejJVQWF3NHE1c3BDcGdtSko5U1IySnU6R1Z5dGhqSmdvRFRZUzBVWA==",
'Content-Type':'application/x-www-form-urlencoded'
},
grant_type:"client_credentials
}).done((response)=>{
console.log(response)
})


I need badly your help!
Thank you in advance!


EPO / OPS Support
Posts: 1298
Joined: Thu Feb 22, 2007 5:32 pm

Re: Ajax connection problem

Post by EPO / OPS Support » Mon Oct 30, 2017 10:24 am

Hi,

Your post reates to OPS and not to Espacenet. Please check the OPS forum to see if you find reply to your question. Also, check OPS documentation for details on how to connet to our web service: https://www.epo.org/searching-for-paten ... html#tab-3

Regards,
OPS support


santi
Posts: 3
Joined: Fri Oct 27, 2017 10:43 pm

Re: Ajax connection problem

Post by santi » Mon Oct 30, 2017 11:00 am

I read that pdf about EPO 3.2 AJAX REST connection, and its not working, I handled access problem with Base64 key and received access token but when I want to get some data, for example
var request = require('request');

var headers = {
'Authorization': 'Bearer 7dr4ODWSBpV21jFWdXomw8s2ANjK',
};

var options = {
url: 'http://ops.epo.org/3.2/rest-services/se ... %3Dplastic',
headers: headers
};

function callback(error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body);
}
else{
console.log(error);
}
}

request(options, callback);

I get response error with 403 (failed to fetch) or 500 internal error.

Please help me handle with that


EPO / OPS Support
Posts: 1298
Joined: Thu Feb 22, 2007 5:32 pm

Re: Ajax connection problem

Post by EPO / OPS Support » Tue Oct 31, 2017 9:45 am

Hi,

Your link is wrong, its completly missing a service (for example, Published services, legal, family.....) I suggest you use Developers Console to see how links needs to be build: https://developers.epo.org/

Also, please see OPS forum for more information,

Regards
OPS support


santi
Posts: 3
Joined: Fri Oct 27, 2017 10:43 pm

Re: Ajax connection problem

Post by santi » Tue Oct 31, 2017 12:44 pm

I copied it from developer console, and many others. Please provide me correct link if you say that this is wrong,and I will tell you if this time it will work.


EPO / OPS Support
Posts: 1298
Joined: Thu Feb 22, 2007 5:32 pm

Re: Ajax connection problem

Post by EPO / OPS Support » Mon Nov 06, 2017 1:28 pm

Hi,

I have also copied it from console:

http://ops.epo.org/3.2/rest-services/pu ... .B1/biblio

As I said,you are missing a service "published-data"

regards,
OPS

PS: please address your future questions in OPS forum


Post Reply