I want to subscribe to users to my Ideamart mobile app. This is the sample request I sent to the ideamart API
{
"applicationId": "APP_01234",
"password": "xxxxx",
"action": "1",
"subscriberId": "tel:94761234567"
}
This is the response I got
{
"statusDetail": "Format of the address is invalid.",
"version": "1.0",
"statusCode": "E1325"
}
How should I fix this issue?
This error occurred because the user was not subscribed the application. User must subscribe it first to use the CAAS api.
try after recharging(reload) your mobile account
Related
When I try to access Admin SDK API I get this error:
XHRGEThttps://admin.googleapis.com/admin/directory/v1/users?customer=some_custumer
[HTTP/3 403 Forbidden 220ms]
Even passing a API_KEY (&key=my_api_key), the same happens.
{
"error": {
"code": 403,
"message": "Request had insufficient authentication scopes.",
"errors": [
{
"message": "Insufficient Permission",
"domain": "global",
"reason": "insufficientPermissions"
}
],
"status": "PERMISSION_DENIED",
"details": [
{
"#type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT",
"domain": "googleapis.com",
"metadata": {
"method": "ccc.hosted.frontend.directory.v1.DirectoryUsers.List",
"service": "admin.googleapis.com"
}
}
]
}
}
Header:
www-authenticate
Bearer realm="https://accounts.google.com/", error="insufficient_scope", scope="https://www.googleapis.com/auth/admin.directory.user https://www.googleapis.com/auth/directory.user https://www.googleapis.com/auth/admin.directory.user.readonly https://www.googleapis.com/auth/apps.directory.user.readonly https://www.googleapis.com/auth/directory.user.readonly https://www.googleapis.com/auth/cloud-platform"
I've configured my app on Google Console. Configured the authentication and scopes like this scopes. I've also configured domain-wide-delegation in Admin Console. I'm expecting to list all Workspace users through this API, but I got this error.
The OAuth works fine.
I am not sure what you are using but here you have my assumptions:
If you are using OAuth, you will need to use a user with enough
privileges to list your users (a super admin account for example)
If you are using a service account, besides allowing wide domain
delegation you need to implement impersonation in your code, that
way you will specify which account the service account will
impersonate to make the API call. So, it is very important to
impersonate an account with enough permissions
If you have any questions please let me know
we are using FCM HTTP v1 API to send push notification.
When, our users register their device tokens, our push server just stores it to database without verification because FCM does not provide token verification APIs.
The only time the push server could detect whether the device token is valid or not is when sending push notification via FCM.
According to FCM registration token management, if the device token is invalid the FCM server responds with UNREGISTERED or INVALID_ARGUMENT.
However, the INVALID_ARGUMENT code can be returned when using invalid payload as well. So we can not distinguish errors between invalid device token and invalid payload.
The following is actual response from the FCM server in case of using invalid device token and invalid payload respectively.
{
"error": {
"code": 400,
"message": "The registration token is not a valid FCM registration token",
"status": "INVALID_ARGUMENT",
"details": [
{
"#type": "type.googleapis.com/google.firebase.fcm.v1.FcmError",
"errorCode": "INVALID_ARGUMENT"
}
]
}
}
HTTP/1.1 400 Bad Request
{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"priority\" at 'message': Cannot find field.",
"status": "INVALID_ARGUMENT",
"details": [
{
"#type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "message",
"description": "Invalid JSON payload received. Unknown name \"priority\" at 'message': Cannot find field."
}
]
}
]
}
}
When the token has a proper format but its user is no longer active, you will receive an UNREGISTERED response indicating that you should delete that token from your backend.
However, if you send a token that does not have a valid format (it has been modified in your backend or truncated, for instance) you will receive an INVALID_ARGUMENT. If this is the case you probably want to check your code because you may be modifying the token somewhere (in App or backend). Probably you have to manually detect and delete those tokens.
Once this is solved, you do not have to worry anymore about the INVALID_ARGUMENT response to delete the tokens, except if you make further changes that corrupt them again.
I am trying to send a WhatsApp message using Facebook graph API
https://graph.facebook.com/v13.0/107858631967863/messages
with below payload
**{
"messaging_product": "whatsapp",
"to": "XXXXXXXXX",
"type": "template",
"template": {
"name": "hello_world",
"language": {
"code": "en_US"
}
}
}**
But I am getting below error message ,
**{
"error": {
"message": "An unknown error occurred",
"type": "OAuthException",
"code": 1,
"error_subcode": 2593006,
"is_transient": false,
"error_user_title": "Account Not Exist",
"error_user_msg": "Account does not exist in Facebook Hosted API, please use /register API to create an account first.",
"fbtrace_id": "ApD14BKT4ZcnAmQe7aMNBYH"
}
}**
You need to first register the number on WhatsApp Cloud API before you can begin messaging. Checkout their developer docs: https://developers.facebook.com/docs/whatsapp/cloud-api/reference/registration
Note, you will need to add the number to the Business Manager account and verify it in the process first.
I'm trying to read insights of my Twitter account with Twitter Insights API and when I request to that given end point I get and error called :
{
"errors": [
{
"code": "UNAUTHORIZED_ACCESS",
"message": "This request is not properly authenticated"
}
],
"request": {
"params": {}
}
}
This is the end point I tried :
https://ads-api.twitter.com/2/insights/accounts/:account_id/available_audiences
I used the given credentials like Consumer Key, Secret and Token, Token secret.
Can anyone explain me why I'm getting this error ? And what I should do ?
Here is a screenshot
Header:
You have to check box "Add params to header"
Everything else should be ok. Just check Consumer Key, Consumer Secret,... data
When I try to send a GET request to Foursquare API below, I get "No matching endpoint." error.
I have validated my tokens and everything seems normal. Any advices?
REQUEST URL
https://api.foursquare.com/v2/users/USER_ID/tastes
RESPONSE MESSAGE
{
"meta": {
"code": 404,
"errorType": "endpoint_error",
"errorDetail": "No matching endpoint"
},
"notifications": [
{
"type": "notificationTray",
"item": {
"unreadCount": 0
}
}
],
"response": {}
}
FoursquareAPI twitter account has told me that I needed to pass m=foursquare in addition to version information.
The correct endpoint information is like
https://api.foursquare.com/v2/users/USER_ID/tastes?oauth_token=TOKEN&v=20150420&m=foursquare
The detailed information about v and m parameters are below.
https://developer.foursquare.com/overview/versioning