Jump to content


Member Since 22 Mar 2017
Offline Last Active Jun 12 2018 01:03 PM

Topics I've Started

API Access

11 June 2018 - 12:35 PM

I am trying to develop a WordPress plugin to help with creating Contact and account sign up forms using X2CRM.


However, I seem to stumbling at the first hurdle.    I want to make use of the API 

I have read the documentation here http://wiki.x2crm.co...T_API_Reference


and have followed it and double checked I have everything as expected.


I have created an API User account, assigned it an Admin role, and have ensured it is Active and has a Valid API Key.


However, when I browse to https://somedomain.c.../api2/Contacts  I get the Username and Password box prompt.  I provide the Credentials


I have tried to use only the API as stipulated in docs  and the username + API key, both giving the same result.


the Form submits and the Login box shows again.  It never connects.



I have also tried to connect using Postman and I only receive the following error.


Is there some additional configuration I need to do?   I am able to actually sign into the App, using the API user account and I can browse the contacts module with that account, edit delete and add new records using that account, so I am certain it's not a permissions issue within the application.   Do I need to authorise a route  or something on my Web Server?  

    "httpHeaders": {
        "Content-Type": "application/json; charset=utf-8",
        "WWW-Authenticate": "Basic realm=\"X2Engine API v2\""
    "reqHeaders": {
        "Host": "somedomain.com",
        "Connection": "keep-alive",
        "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36",
        "Cache-Control": "no-cache",
        "Postman-Token": "609e0049-363c-1c24-a6be-5e584e01fb8a",
        "Accept": "*/*",
        "Accept-Encoding": "gzip, deflate, br",
        "Accept-Language": "en-GB,en-US;q=0.9,en;q=0.8",
        "Cookie": "PHPSESSID=klhr73kf6r63clhktu2go42b70"
    "message": "Missing user credentials: user",
    "error": true,
    "status": 401