Find User by User Email

Answered

Comments

6 comments

  • Andreas Haugstrup Pedersen

    You can use https://developers.podio.com/doc/contacts/get-contacts-22400 and filter on "mail"

    All the best,

    Andreas

    0
    Comment actions Permalink
  • Alejandro Carrasquilla

    Thanks for your answer, Could you please provide an example, I am not able to filter by mail in the Sand Box.  

    In addition to this i am get an  Unauthorized response when doing the following call. Please help

    string requestUrl = Podio.API.Constants.PODIOAPI_BASEURL + "/contact/" + "?" + "contact_type=user&exclude_self=false&order=name&required=name%2Cmail&type=mini";

    // request the api
    Podio.API.Utils.PodioRestHelper.PodioResponse response = Podio.API.Utils.PodioRestHelper.Request(requestUrl, client.AuthInfo.AccessToken);

    var result = response.Data;

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    You need to set a query param with an email address: mail=yourmail@example.com

    As for the unauthorized response: You need to authenticate before you can make API calls. More details here: https://developers.podio.com/authentication

    /Andreas

    0
    Comment actions Permalink
  • Alejandro Carrasquilla

    I am authenticated. When I call to get all Contacts with no attributes I get the first 500 users. Please Help

    string requestUrl = Podio.API.Constants.PODIOAPI_BASEURL + @"/contact/";

    However when I try to add attributes such as the email I get the unauthorized response.

    string requestUrl = Podio.API.Constants.PODIOAPI_BASEURL + @"/contact/?mail=email@sample.com";

    0
    Comment actions Permalink
  • Alejandro Carrasquilla

    I figured it out,  I had to put the requestData in the request and not in the request Url.  Thanks for your help

     Dictionary<string, string> requestData = new Dictionary<string,string>();
                requestData.Add("mail", email);

                string requestUrl = Podio.API.Constants.PODIOAPI_BASEURL + @"/contact/";

                // request the api
                Podio.API.Utils.PodioRestHelper.PodioResponse response = Podio.API.Utils.PodioRestHelper.Request(requestUrl, client.AuthInfo.AccessToken, requestData, Podio.API.Utils.PodioRestHelper.RequestMethod.GET);

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    You need URL encode the email value. :)

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk