Access tokens

This space is made available to users of Open Patent Services (OPS) web-service and now also to users of EPO’s bulk data subscription products such as 14. EPO worldwide bibliographic database (DOCDB), 14.11 EPO worldwide legal status database (INPADOC), 14.12 EP full text data, 14.1 EP bibliographic data (EBD)and more.

Users can ask each other questions, exchange experiences and solutions, post ideas. The moderator will use this space to announce changes or other relevant information.
Post Reply

gw1976
Posts: 3
Joined: Wed Sep 11, 2013 2:48 pm

Access tokens

Post by gw1976 » Wed Sep 11, 2013 3:04 pm

Hi all,
Did anyone have any success generating the access token using the wget command:

wget --no-check-certificate --header='Authorization: Basic <base64_string>' --header='Content-Type: application/x-www-form-urlencoded' <https_access_token_url>

and

wget --no-check-certificate --header='Authorization: Basic <base64_string>' --header='Content-Type: application/x-www-form-urlencoded' <https_access_token_url?grant_type=client_credentials>

I keep on getting a 400 error.
I also read one of the posts and tried the httprequester add-on for firefox and get the following error:

POST <https_access_token_url?grant_type=client_credentials>
Authorization: Basic <base64_string>
Content-Type: text/xml


-- response --
400 Bad Request
Content-Type: application/xml

WWW-Authenticate: Basic

Content-Length: 91

Connection: keep-alive

<error><code>400</code><message>Required param : grant_type</message>
</error>

Has anyone had any success generating the access token? If you did, which method did you use?
Thanks for any replies!


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

Re: Access tokens

Post by EPO / OPS Support » Thu Sep 12, 2013 9:13 am

To get the access token we need to send a POST request with "grant_type=client_credentials" in its body and the "Content-Type" header set to "application/x-www-form-urlencoded". I have tried the following command and it works:

curl -H "Authorization: Basic QWYzMjBrUVdkb1VnUmxnNUNrN3NITU5PVFN2cHI0M0Y6NWtuanh1YldoblhkeG45eQ==" -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=client_credentials" -X POST https://ops.epo.org/3.1/auth/accesstoken

Kind regards,

OPS support


gw1976
Posts: 3
Joined: Wed Sep 11, 2013 2:48 pm

Re: Access tokens

Post by gw1976 » Thu Sep 12, 2013 8:28 pm

Thanks for the reply! I got it to work for the wget command. I made a big mistake by adding "grant_type=client_credentials" to the url instead of the body.

Have a nice day!


Post Reply