Loading ...

API key generation for go live SSO not working as on staging. Please help! | Communifire Support

Home » Spaces » Communifire Support » forum » Communifire API & Developers » API key generation for go live SSO not working as on staging. Please help!
Communifire Support

Leave Space :

Are you sure you want to leave this space?

Join this space:

Join this space?

Add a new tab

Add a hyperlink to the space navigation. You can link to internal or external web pages. Enter the Tab name and Tab URL. Upload or choose an icon. Then click Save.

The name that will appear in the space navigation.
The url can point to an internal or external web page.
Login to follow, share, and participate in this space.
Don’t have a support community login?Create your account now
Posted in: Communifire API & Developers

API key generation for go live SSO not working as on staging. Please help!

Subscribe to RSS
  • robertkmaaye

    Hi

    We are trying to go live currently with a SSO between ukcoaching.org and community.ukcoaching.org (formerly connectedcoaches.org)

    I asked Matt a couple of weeks ago if anything would need to be done by you guys but he said that wouldnt be necessary however we have run into an issue we think might be related to the fact you need to do something from your end.

    We generated the API key but it doesnt seem to be working as it was on sandbox

    The process is getting to the create user request, and the live CC environment is returning something totally different to what the staging one was.

    Our agency has asked us to send you this – please advise asap

    We make a request to the API to create a user, and on the staging instance, this returns in a success result, and creates the user.

    On the live API, the same call is returning a list of users, so it seems like it is acting as a search rather than a create user. I think we may need to open a support ticket with CC, as the prod API is behaving differently to the staging one for some reason.

    I have attached images of the API call being made and the differences in the output.

    Production:

     

     

    I cant get a pic of the staging response as its not responding at the moment (been either non responsive or down all morning).

     

     

     

    Request is the same, but the response is something like:

     

    {

        "IsError": false,

        "ResponseMessage": "",

        "ResponseData": 123456

    }

     

    Where the response data contains the ID of the user being created.

     

    Please advise asap

    ALL images removed

  • robertkmaaye

    they have also sent this just now so we got a response eventually...

    Just in case you need to add it to the ticket, the response eventually came through after about 15 minutes…

     

    IMAGE REMOVED

  • aparna

    Hi Robert,

    For troubleshooting the issue, is it ok if we create a test user to your production site using API?
    We will delete the user once we are done.

    Thanks,
    Aparna

  • robertkmaaye

    Absolutely please go for it anything to get it resolved

    Thanks

    Rob

  • aparna

    I tried creating a new test user through API and its working fine for me:



    I can also see the newly created user on manage people page:



    Please let me know if I missed something?

    Thanks,
    Aparna

  • robertkmaaye

    Hi Aparna

    I have forwarded your reply to our agency and will get back to you asap

    Thanks

    Rob

  • robertkmaaye

    Hello

    That looks like the same request we are making, but unfortunately we are getting a very different response. Could the be related to the API key being linked to a user with missing permissions or something similar?

    Its almost like the request is being treated as a GET rather than a POST for some reason.

    Thanks

    Adam

  • aparna

    Can you please confirm if the API key with which you are trying to add a user is of an Administrator only?

    Also, can you please try restarting your postman application and then try to make a new request in a new tab.

    I am using Advanced Rest Client application for the request and its working fine for me, you can also try using some other application and see if it's the problem with the postman only.

    Thanks,
    Aparna

  • robertkmaaye

    Hello

    Yes, the user we used for the API key is a full admin account, and has the "SiteAdministrator" role attached.

    We are getting this error both with Postman, and with the site we are using this with. When connected to the staging instance, both work correctly and return the numerical result, when attached to the production one, it acts like the GET version of the request.

    Adam

  • robertkmaaye

    Hi(Rob here)

    None of our accounts (Even the one with only site administrator role) are able to generate an API key that works

    Could this be something Matt Trujillo would need to do for us or someone else if something in site permissions is blocking us? If so can one be generated asap please

    Thanks

    Rob

  • sunny

    Hi Rob,

    It should not be related to api key, but you can still try regenerating your api key from Preferences , and if that doesn't work, please search for Bryce user in Manage People and inside preferences, get Rest Api Key of this user and try again.

    Aparna used Bryce's Rest Api key only

  • robertkmaaye

    Hi we have done this and are getting exactly the same result

    Thanks

    ROb

  • sunny

    We tried again to send the request with Postman:

    My Request body:

    {
    "UserName": "axero2",
    "Email": "test2@axerosolutions.com",
    "Password": "test",
    "FirstName": "Axero",
    "LastName": "Test"
    }

    1. Please make sure you are using https while making requests.

    2. Please remove all Params from the request.

    3. There should be only 2 headers in the request a) Content-Type b) Rest-Api-Key

    as shown in above example, please try again and let us know if you still face the issue.

  • robertkmaaye
    Answered

    Hello

    We had this setup to use HTTP rather than HTTPS. Changed this over to HTTPS and it creates a user correctly now.

    Many thanks for the help

    Adam