Help Needed with Configuring ZC Microservice
I'm attempting to create a simple microservice, but am running into problems with scope and auth. Using Custom API Builder, here's my setup:
1. Method: GET
2. Auth: OAuth2
3. User Scope: All users
4. Response: Standard
5. Function: A function that returns a list of maps
If I test the API using invoke url, I receive an error. Note, the zoho_oauth_connection is active and includes ZohoCreate.report.READ.
Can't seem to find a way to add Zohocreator.customapi.EXECUTE.
I'm using environments, but every env has access to that connection.
What am I missing?
FUNCTION TO TEST API:
void testCustomAPI()
{
response = invokeUrl
[
type : GET
connection : "zoho_oauth_connection"
];
info response;
}
RESPONSE:
{"code":2945,"description":"This is an invalid oauthscope. Please regenerate the oauthtoken corresponding to the API with proper oauthscope."}
If I copy and paste the url into the web browser, I receive:
{"code":1030,"message":"Authorization Failure. The access token is either invalid or has expired. Please check your Zoho Account for more information."}