Bettermode allows apps to perform actions on behalf of a bot account or a specific member of the site using API. Bot accounts can perform all actions that a site admin can perform.
Here are some of the most common errors that you might encounter when youâre trying to generate an access token to perform actions through the App:
âForbiddenâ Error:
If youâre trying to make an API call using an app that is not published OR installed on that specific site, the Forbidden error is returned.
How to Resolve the Issue?
Please ensure that the site is Published within the App. To check this, please go to the Developers Portal, log in and Open the App. Inside App, check if you see âUnpublishedâ right next to the name of the Site. Please see the example below. As you can see in the screenshot below, right next to CJâs Site, you can see a red-colored âUnpublished' button. That confirms that this App is distributed to the correct Site.
Please go to your Profile Picture on the top rightâ Administrationâ Apps and check if the newly created App is installed or not. For example, an app was created called âWebhooks Testingâ and this App is visible in the âAppsâ section.
If youâre still facing issues, please post about the issue in Support Space on the Bettermode Site with the following Information:
Name of the App created and used to generate an App Access token.
URL of the site for which the App is Published
Screenshots of the call theyâre making.
Screenshots of the Developer Portal confirming that the App is published. To access the Developers Portal, please follow the steps in Point 1 above.
âUnauthorizedâ Error
If you are receiving the Unauthorized Error, it means that the call doesnât have the correct format.
How to resolve the Issue?
Hereâs where you can learn more about how to properly call the endpoint to generate the token: App Access Token
An access token needs the following Information:
networkId- To get the correct networkID of the site, go to Developers Portal, log in and open one of the Apps. On the left side, go to Test & Publish, and you will be able to see the networkID of the site right below its URL. Hereâs an example:
entityId- Itâs the same as NetworkID.
impersonateMemberId- ID of the members or the bot that needs to be impersonated. To find the ID of a member, go to Profileâ Administrationâ Members and you will see the id for all members.
clientId & clientSecret- - Go to App(inside Developers Portal)â Credentials
If youâre still facing issues, please post about the issue in Support Space in the Bettermode Site with the following Information:
Name of the App created and used to generate an App Access token.
The Site URL for which the App is Published
Screenshot of the call theyâre making.
The app {AppID} cannot access the network {networkID}
This error means that the App is not installed on the correct Site.
How to resolve this issue?
We need to make sure that the newly created app is published in the correct Site. Please go to Developers Portal, log in and open the App in question. On the left side, go to Test & Publish and you will be able to see the networkID of the site right below its URL. You can confirm if the networkID is correct. Hereâs an example:
Most likely, this is the reason behind the Issue. If youâre still facing issues, please post about the issue in Support Space in the Campfire Site with the following Information:
Name of the App created and used to generate an App Access token.
URL of the site for which the App is Published
Screenshot of the call theyâre making.
Screenshot of the Developer Portal confirming that the App is published. To access the Developers Portal, please visit this URL: Developers Portal
The app {AppID} cannot impersonate member{memberID}
This error suggests that either the memberID is wrong or the member belongs to a different site, and weâre using an incorrect AppID.
How to Resolve the Issue?
We need to make sure that the member exists on the site where weâve installed the app. To check that, please go to Developers Portal, log in and open the App in question. On the left side, go to Test & Publish and you will be able to see the name and networkID of the site right below its URL. You can go to that site using the URL and search if the member exists. Most likely, the member wonât exist. If youâre still facing issues, please post about the issue in Support Space in the Campfire Site with the following Information:
Name of the App created and used to generate an App Access token.
The site URL for which the App is Published
Screenshot of the call theyâre making.
Id of the member.
Screenshot of the Developer Portal confirming that the App is published. To access the Developers Portal, please visit this URL: Developers Portal