Question:
What scope is needed for the API token (PW_API_TOKEN) in the Pushwoosh control panel?
Answer:
The token does not need any per-method permission list, but two things do matter:
-
The token type must be Device. Pushwoosh has two token types, Server and Device, and each is valid only for its own API scope. The SDK calls Device API methods (
registerDevice,setTags,pushStat,postEvent,registerUser, …), so a Server token will fail with an authentication error. Create the token as Device in Settings → API Access → Generate New Token. - The token must have access to the project you initialise the SDK with. Open the three-dot menu next to the token and use Edit token to select the projects it may access (or Grant access to all projects). A token with no project access will be rejected.
Beyond that, no additional scopes or rights have to be configured — the SDK only needs the token value (PW_API_TOKEN) plus the Pushwoosh Application Code.
See API Access token in the Pushwoosh documentation.
Comments
0 comments
Please sign in to leave a comment.