Lierrmm / Node-CallOfDuty

NodeJS Wrapper for the Call Of Duty API.
https://codapi.dev
MIT License
223 stars 80 forks source link

Not permitted: not allowed #65

Closed guyng closed 2 years ago

guyng commented 3 years ago

I'm getting this error: Not permitted: not allowed It just started recently, anyone has the same issues? @Lierrmm

Lierrmm commented 3 years ago

"Not permitted: not allowed" means you do not have permission to view the data. i.e. Your not authenticated properly or the user you are looking up has their stats set to private.

guyng commented 3 years ago

"Not permitted: not allowed" means you do not have permission to view the data. i.e. Your not authenticated properly or the user you are looking up has their stats set to private.

Hm, it happens just with activision users i don't think its authentication issue because i do get the atkn, rtkn and use it in my cookie but also the users i'm trying it on the match data is being tracked fine by cod.tracker.gg maybe activision made some changes? I know for a fact that the guy in the screenshot below has his stats set to public but still i get the same error when i try to fetch his stats. can you try to get stats for him and see if it works? @Lierrmm Screenshot_11

Lierrmm commented 3 years ago

Yes, You will get this error when looking up Activision IDs. It is a change ATVI made several months ago related to other sites charging for certain information.

AFAIK, CODTracker has a deal with ATVI to retrieve this information, which is why you are able to see it on their website.

SwiftCODA commented 3 years ago

Hi @Lierrmm. I was about to post the same issue but then I saw this one. I'm trying to create a wrapper in Swift which is based off of your Node.js wrapper. My first step is to organize the requests with Postman. I'm getting the same error message when requesting a PlayStation user. Please feel free to point out anything I'm doing wrong in these requests.

1) registerDevice (POST)

Screen Shot 2021-06-07 at 10 57 20 AM

Response:

{
    "status": "success",
    "exceptionMessageList": [],
    "errors": {},
    "exceptionMessageCode": null,
    "data": {
        "authHeader": "731831176a265d232f40b0a6d6f8b1b9"
    }
}

2) login (POST)

Screen Shot 2021-06-07 at 10 59 05 AM Screen Shot 2021-06-07 at 10 59 29 AM Screen Shot 2021-06-07 at 10 59 51 AM

Response:

{
    "rtkn": "myRtkn",
    "ACT_SSO_COOKIE": "myActSsoCookie",
    "ACT_SSO_COOKIE_EXPIRY": 1638640874103,
    "gameAccountLinked": true,
    "success": true,
    "ACT_AUTH_TOKEN": null,
    "s_ACT_SSO_COOKIE": "mySActSsoCookie",
    "atkn": "myAtkn"
}

3) getMWMultiplayer (GET)

Screen Shot 2021-06-07 at 11 02 43 AM Screen Shot 2021-06-07 at 11 03 04 AM

Main Cookie: new_SiteId=cod; ACT_SSO_LOCALE=en_US;country=US;XSRF-TOKEN=68e8b62e-1d9d-4ce1-b93f-cbe5ff31a041;API_CSRF_TOKEN=68e8b62e-1d9d-4ce1-b93f-cbe5ff31a041;rtkn=myRtkn;ACT_SSO_COOKIE=myActSsoCookie;atkn=myAtkn;

Response:

{
    "status": "error",
    "data": {
        "type": "com.activision.mt.common.stdtools.exceptions.NoStackTraceException",
        "message": "Not permitted: not allowed"
    }
}
Lierrmm commented 3 years ago

Hi @Lierrmm. I was about to post the same issue but then I saw this one. I'm trying to create a wrapper in Swift which is based off of your Node.js wrapper. My first step is to organize the requests with Postman. I'm getting the same error message when requesting a PlayStation user. Please feel free to point out anything I'm doing wrong in these requests.

  1. registerDevice (POST)
Screen Shot 2021-06-07 at 10 57 20 AM

Response:

{
    "status": "success",
    "exceptionMessageList": [],
    "errors": {},
    "exceptionMessageCode": null,
    "data": {
        "authHeader": "731831176a265d232f40b0a6d6f8b1b9"
    }
}
  1. login (POST)
Screen Shot 2021-06-07 at 10 59 05 AM Screen Shot 2021-06-07 at 10 59 29 AM Screen Shot 2021-06-07 at 10 59 51 AM

Response:

{
    "rtkn": "myRtkn",
    "ACT_SSO_COOKIE": "myActSsoCookie",
    "ACT_SSO_COOKIE_EXPIRY": 1638640874103,
    "gameAccountLinked": true,
    "success": true,
    "ACT_AUTH_TOKEN": null,
    "s_ACT_SSO_COOKIE": "mySActSsoCookie",
    "atkn": "myAtkn"
}
  1. getMWMultiplayer (GET)
Screen Shot 2021-06-07 at 11 02 43 AM Screen Shot 2021-06-07 at 11 03 04 AM

Main Cookie: new_SiteId=cod; ACT_SSO_LOCALE=en_US;country=US;XSRF-TOKEN=68e8b62e-1d9d-4ce1-b93f-cbe5ff31a041;API_CSRF_TOKEN=68e8b62e-1d9d-4ce1-b93f-cbe5ff31a041;rtkn=myRtkn;ACT_SSO_COOKIE=myActSsoCookie;atkn=myAtkn; Response:

{
    "status": "error",
    "data": {
        "type": "com.activision.mt.common.stdtools.exceptions.NoStackTraceException",
        "message": "Not permitted: not allowed"
    }
}

Feel free to add me on discord: Liam#0947 we can go through it step by step.

SwiftCODA commented 3 years ago

@Lierrmm Just added you SwiftCODA#2497.

Emad-salah commented 2 years ago

Was this issue ever solved? I see that it ended suddenly with you adding the other guy and I don't see a solution here.

SwiftCODA commented 2 years ago

@Emad-salah I ended up not using this API, or any COD API for that matter. I got locked out of my Discord and honestly I don't remember if we ever solved the issue or not. Sorry man.

Lierrmm commented 2 years ago

Was this issue ever solved? I see that it ended suddenly with you adding the other guy and I don't see a solution here.

@Emad-salah what platform are you using when querying? ACTI and UNO will no longer work due to restrictions from the COD API itself.

Emad-salah commented 2 years ago

@Lierrmm sorry for the late reply didn't realize you responded. I was aware Acti and UNO won't work but the issue is showing up for me when I try to link some PSN/BNET accounts but not all of them

Lierrmm commented 2 years ago

I know some users have been complaining about this and it seems to be something on the COD API side. If you join the discord server, I can look into it more for you.

Emad-salah commented 2 years ago

great, I will join and let you know! Thank you!