getSpaceContacts is a wrapper for https://developers.podio.com/doc/contacts/get-space-contacts-22414 and app auth is not allowed. Think about it -- how could the app itself have authorization to look up something pertaining to the space? The general rule is: App auth can only be used for actions pertaining only to that app.
Is getSpaceContacts by space id allowed with App Authentication. When I was trying to get contacts from space id(php), I got an empty error description. But I got the status code as 400(grant_error). So I think this is not allowed with App Authentication. If so is there any way to retrieve space contacts with App Authentication?
Can anyone help me with this?
Please sign in to leave a comment.
Yeah. Thank you for answering my question.
But it allows to create new contacts for the space right? Is there any way to get contacts of users pertaining the app from app auth?
If you must use app auth I think your best bet is to use Get items (https://developers.podio.com/doc/items/get-items-27803) for the app. You will have to run through all items and check if the contact field(s) has a value, and extract the contact information from the field.
Yes, I'm trying it now. Thanks Casper and Andreas.
Hm. I'm not allowed to create contacts via app auth? How can I forward contact formulars from my website to podio?
Casper / Andreas...
We did use Casper's recommendation in this thread to do this, but we are worried that this is very API intensive and will likely cause performance problems for our app and for Podio once our app is used by hundreds and thousands of users.
Our app is a standalone piece of code that is getting triggered by an incoming email and tries to create a contact to be added to an app item. If we don't first check to see if the contact exists, we end up creating duplicate contacts (bad)...
The problem is that 'get space contacts' ( https://developers.podio.com/doc/contacts/get-space-contacts-22414) won't work for App Auth.
Here is our idea...
If we could pass a flag to Create Space Contact that allowed it to throw an exception if the contact already exists (based on email address), that would fix this... then we could try to create it and when we get this exception, then we would know we don't need to create it.
Would it be possible to do something like this?
I don't think you will be very happy with us if we have 10000 items in our database and have to search through every item to determine if this contact doesn't exist... :)
I understand the problem. We will look into what's possible and get back to you.
We've discussed this some more. We want fix this by adding a different method for getting only space contacts where app auth is allowed. However, it's a bit of work, so I can't really tell you when it will happen.
Can you tell me what is the way to find a Contact created by an app with App authentication? As I can see in the above conversation you planned to something like this, but I'm not aware of the exact way.
Also, is it possible to note in the API docs if a call isn't available with a certain Authentication type?
Sorry, this is this on our list, but has not been prioritized, so for now there is no way to get space contacts via app auth.
Only API operations that are specifically marked with "App Authentication" in the upper right corner supports it.