Results 1 to 6 of 6

Thread: Help About clash of clans api

  1. #1

    Question Help About clash of clans api

    hello all,

    please i have a question for how can i get the token from api auto
    because every day i open the postman app for make a request i got message invalid auth from this ip address
    so must i everyday delete the key API from my account and create new one or must everyday change the token manually ?
    if supercell have api for generate the token auto when it's expire

    thank you very much

  2. #2

    Join Date
    Sep 2014
    Location
    Brexit Island
    Posts
    6,013
    Does you IP address stay the same?

    You can use the same token forever, but you need a fixed IP address
    For info on CWL see: Clan Leader CWL survival guide
    --------------------
    Forum cup organiser. The forum cup discord server is: https://discord.gg/KEUxV2e

  3. #3
    yes i have the same ip address but every 16 hour i get this message

    {
    "reason": "accessDenied.invalidIp",
    "message": "Invalid authorization: API key does not allow access from IP XX.XXX.XXX.XX

    }

  4. #4

    Join Date
    Sep 2014
    Location
    Brexit Island
    Posts
    6,013
    Have you checked that XX.XXX.XXX.XXX exactly matches the IP in your web token (you can check it in the developer account I think)
    For info on CWL see: Clan Leader CWL survival guide
    --------------------
    Forum cup organiser. The forum cup discord server is: https://discord.gg/KEUxV2e

  5. #5
    yes it's exactly , so i wondered why must every day i made new token how can i make app for iOS device if the token every day is change it, in that case must the super cell provide the api for make request to fetch new token

  6. #6

    Join Date
    Sep 2014
    Location
    Brexit Island
    Posts
    6,013
    How are you managing to get an iOS device to use the same IP address all the time? That would only happen if it remained connected to the same WiFi and that WiFi had a static IP assigned.

    You usually can't call the API from individual devices because the device IP would change - giving the exact error that you're seeing. The API is usually called from a web server
    For info on CWL see: Clan Leader CWL survival guide
    --------------------
    Forum cup organiser. The forum cup discord server is: https://discord.gg/KEUxV2e

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •