getAccessToken

Retrieves an access token with which you will be able to authenticate the user in private SOAP operations. Prior to requesting the token, the user must have granted access to the client to perform the operation on his behalf. This authorization should be performed from Infojobs' user private menu. If this step is missing, the getAccesToken operation will return a soap fault response.


Request

WSDL Production URL

https://api.infojobs.[net|it]/soap/WSAccessTokenService?wsdl

WSDL Testing URL

https://api.infojobssbx.[net|it]/soap/WSAccessTokenService?wsdl

Security

  • User Role: PUBLIC

Parameters

Name Description

email

String

Required

The email with which the user logs into Infojobs.

Response

Response entities

Name Description

token

String representing the access token

Error codes

Code Description

WS.114

User email is not valid

WS.115

Client not specified

WS.116

The client is not authorized by the user to perform any operation.

WS.118

The web service client is not linked to the company.

Examples

In this request the client:SOAP-TEST-CLIENT gets the access token for the user with email:soap@test.com

Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:acc="http://accesstoken.endpoints.www.soap.infojobs.net/">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-799830164" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>SOAP-TEST-CLIENT</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TEST-CLIENT-SECRET</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <acc:getAccessToken>
         <email>soap@test.com</email>
      </acc:getAccessToken>
   </soapenv:Body>
</soapenv:Envelope>

Response

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Header>
      <wsse:Security soap:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
         <wsu:Timestamp wsu:Id="TS-2">
            <wsu:Created>2012-05-06T20:15:25.305Z</wsu:Created>
            <wsu:Expires>2012-05-06T20:20:25.305Z</wsu:Expires>
         </wsu:Timestamp>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <ns1:getAccessTokenResponse xmlns:ns1="http://accesstoken.endpoints.www.soap.infojobs.net/">
         <token>20000000-0000-0000-0000-0000</token>
      </ns1:getAccessTokenResponse>
   </soap:Body>
</soap:Envelope>